Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

appName returns IE 3

Status
Not open for further replies.

y2k1981

Programmer
Aug 2, 2002
773
IE
how come the
Code:
navigator.appName
returns
Code:
Microsoft Internet Explorer
? Why doesn't it return opera?
 
In File > Preferences > Network there's an option to identify the browser as Opera, IE or Mozilla. I guess yours is showing IE rather than Opera.

John
 
As John said navigator.appName always returns the "spoofed" browser. The easy way to change spoofing mode is to press the "F12" key. The reason for the spoofing mode is to enable Opera to work with pages that sniff for specific browsers.

If as a web developer you need to detect opera then you can parse the UserAgent string which always contains the word "Opera".

You might find this interesting:
 
sorry everybody, I thought I had already responded to this thread. You're both spot on, it was set to detect as IE. and OperaFan, you've just answered my next question.

Thank you both
Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top