Just think what Google Chrome would return when we run browser detection code written in JavaScript ? as we all know Navigator object contains information about the visitor’s, I mean the user’s browser name, browser version and more.
If you would like to know the answer, here it is – Just run the below JavaScript code in the new Google Chrome browser, you will know the answer:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
var browserName=navigator.appName; if (browserName=="Netscape") { alert("Hi Netscape User!"); } else { if (browserName=="Microsoft Internet Explorer") { alert("Hi, Explorer User!"); } else { alert("Check out the browser which you are using, or upgrade your browser with the new one?"); } } |
So, Guys! what answer you got, Yes! the navigator.appName returns "Netscape ". As we all know "appName " of navigator holds the name of the browser. Similarly we have so many properties of navigator object like for example: navigator.appVersion, here "appVersion " holds the version of the browser.
Related Articles which you would like to read:
1. Google Chrome Browser on your personal USB Drives
2. Twinkling hidden features of Google Chrome
3. Download Google Chrome Browser, its awesome
4. Error: Invalid source HTML for this operation
5. System Error: -1072896658 in IE
6. Snippet Code for Simple Ajax Tabs with cool CSS Styles
7. Remove special characters (like !, >, ?, ., # etc.,) from a string using JavaScript
8. Using XMLHttpRequest, reading XML data (Adobe AIR Application)
Articles which you would like to read:
Related Entries...
-
Hi developers, today I encountered one error which works fine in Mozilla Firefox but giving an error ...
-
Do you guys want to have a quick tour of the new G1 Phone, yeah here it is. Google and T-Mobile toget ...
-
When I am running my Ajax web application, the application is rendering properly in Mozilla Firefox b ...
-
Here is a simple snippet on adding a "div" to the body tag dynamically using JavaScript, after going ...
-
As we all know that T-Mobile announced the world's first Android-powered phone, the G1. This comes lo ...
-
Do you want to know and detect visitor�s browser version using JavaScript, yeah here is the script th ...
-
Google Chrome Browser on your personal USB Drives
As we all know about the launch of Google Chrome, and created a history on the launching day, everybo ...
-
In the following article we can have a look at the ways of creating new files in Ruby programming lan ...
-
Hi there, most of the people have used GMail but not aware of some simple tips which can grab from GM ...
-
I am back again with some good snippet on "Placing a Play Icon over the image using CSS", After going ...
7 Responses
my thoughts on google chrome
https://snsays.com/260/google-chrome/
Nice investigation on this, cool
I think it will be proved that google chrome is netscape browser
[...] develop AJAX Website � DeveloperSnippets 3. JavaScript Visitors Browser Detection Code Snippet 4. Netscape is the �navigator.appName� for Google Chrome 5. Error: Invalid source HTML for this operation 6. System Error: -1072896658 in [...]
Google Chrome is Netscape and Netscape is Mozilla Firefox, so Google Chrome is just another Firefox? What am I missing over here? And it seems that Safari delivers the same appName. What is this?
The reason behind that, is that google chrome uses webkit, the same render as safari, which in fact is a fork of khtml, the render of konqueror. Most of the webkit based browsers show appName=’Netscape’ for compatibility reasons with the silly scripts that check that variable.
Thanks, been wondering about this, Google has some good tricks up their sleeves.