The user-agent string can help you easily determine if a visitor is viewing your website on a Windows 8 computer. Microsoft is using “Windows NT 6.2” in the user-agent string to identify Windows 8 while the other parameters determine the actual web browser.
IE 10 on Windows 8

User Agent String of IE 10 on Windows 8

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)

Firefox 10 on Windows 8

Mozilla/5.0 (Windows NT 6.2; rv:10.0) Gecko/20100101 Firefox/10.0

Google Chrome on Windows 8

Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.12 Safari/535.11

Apple Safari on Windows 8

Mozilla/5.0 (Windows NT 6.2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1 Safari/534.50 

User Agent String of Opera on Windows 8

Mozilla/5.0 (Windows NT 6.2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1 Safari/534.50