• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why does the User-Agent=Mozilla/4.0 when I use MSIE 6.0?

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if this is the proper place to ask this type of question so please forgive me...
Why is it that the User-Agent HTTP header value is alway set to Mozilla/4.0 when Mozilla is not being used to generate the request?
For instance I am using MSIE 6.0 to make a request and the User-Agent in the request header is set to:

I'm sure there is some sort of historical explination for this but of course I can't find it on the net so I am hope somone here can educate me.
Thanks,
Jamin
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this is more of a browser question than a JSP question, I'm going to shuffle this off to the HTML forum.
But the short answer is that there is no standard for the User-Agent header so browsers can do whatever they want. And that makes it a, er, 'challange' to decipher in a deterministic manner.
 
Jamin Williams
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear.
So does anyone know why MS would want to use Mozilla/4.0 as opposed to using something that is more specific to MSIE? For instance MSIE/6.0?
Jamin
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jamin
try go to this w3schools link using IE6 and see the magic
It shows Netscape 4.0!!!
So as suggested earlier it seems that due to non-standardization of this browser string for User-Agent header makes our life difficult.
But a possible work around could be,
- Detect if its a mozilla,netscape browser. I have so far not seen that Mozilla/netscape browsers returning incorrect information (e.g. MSIE6 as the browser type)
- and if (!netscape || !mozilla || !other_browser) then assume its IE..

this might work for you..
Regards
Maulin
 
Jamin Williams
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the tip Maulin.
I guess if I want to go that route I need to find out what the other browers return...
If anyone knows the answer to the original question, please feel free to share it!
Jamin
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
follow the link I posted in this thread last week...
https://coderanch.com/t/114417/HTML-JavaScript/determine-NetScape-browser-version
Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic