Detecting Google Chrome
General
Need to check Google's new browser to see if it has a quirk that none of the other browsers have? You can detect Chrome by using this snippet in your scripts.
Notes
- Created by: David Walsh
- Web Site: http://davidwalsh.name/
- Posted: September 5, 2008
Source Code
Paste this source code into the designated areas.
Head
Paste this code into your script.


Leave a Response
(1 comment)You have to change the Safari detection as well. The word Safari and Chrome are both in the user agent string.[br /]Something like this:[br /][br /]var is_safari = navigator.userAgent.toLowerCase().indexOf('chrome') == -1 && navigator.userAgent.toLowerCase().indexOf('safari') > -1;