Howto detect Chrome Browser with jQuery

By 22. Februar 2013 general No Comments

The official site of jQuery.browser ( doesn’t show how to detect if the user is using the Chrome browser.

$ = /chrome/.test(navigator.userAgent.toLowerCase()); 

This saves the user Agent to $… but the userAgent can be changed easily.
Here is a more robust version which uses a global variable:

$ = (typeof === "object");

If the browser is chrome the variable $ is set to true and can be checked like this: