Browser Detect (from quirksmode)


/ Published in: JavaScript
Save to your folder(s)

A useful but often overrated JavaScript function is the browser detect. Sometimes you want to give specific instructions or load a new page in case the viewer uses, for instance, Safari.

Copy this script into your JavaScript files. It works immediately, and you can query three properties of the BrowserDetect object:

* Browser name: BrowserDetect.browser
* Browser version: BrowserDetect.version
* OS name: BrowserDetect.OS

URL: http://www.quirksmode.org/js/detect.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.