开发者

Firefox, one browser, but two different versions?

开发者 https://www.devze.com 2023-01-19 23:00 出处:网络
I our web application is compatible with Firefox 3.6+ We have a Firefox installed on one of our local machiens and on the top of the about page, the version is set to 3.6.10 which is what we expect.

I our web application is compatible with Firefox 3.6+

We have a Firefox installed on one of our local machiens and on the top of the about page, the version is set to 3.6.10 which is what we expect.

On the bottom of the about page, the version is set to: Gecko/20100914 Firefox/3.0.1

Because it's set to 3.0.1 it gets picked up by client side script and the user is unable t开发者_运维百科o use the application. Currently I'm unable to replicate this.

Our guess is that user didn't install 3.6.10 from scratch, but updated from 3.0.1

Did anybody else come across this before?

Thank you

Edit: The Gecko version is "Gecko 1.9.2" which comes with Firefox 3.6...so that's also fine.... very confused

Edit 2: IIS LOG Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+ru;+rv:1.9.2.10)+Gecko/20100914+Firefox/3.0.1+(+.NET+CLR+3.5.30729;+.NET4.0C) 200 0 0

I can see the 3.0.1 but I don't understand why About page displays a browser version as 3.6.10

Also if you look at the GECKO version from IIS log, it's 1.9.2 which is supplied with Firefox 3.6.*

Edit 3: The problem was in a FireFox .config file which has been manually edited/spoofed


I strongly suspect your client has a modified user agent string. You can reset it by following these instructions.


There are at least 2 ways of checking browser version.

One is to use User-Agent header from HTTP request:

GET /index.html HTTP/1.1
Host: localhost:8765
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0E)
...

But such request can be changed by some proxy, or by user (this way Opera can easily imitate MS IE etc).

Other way is to use JavaScript navigator properties. It is described in: Using the navigator object to detect client's browser.

I don't know which way was used to detect browser version. If it was from HTTP header then it is easy to change -- you probably have to change browser version detection to JavaScript. If JavaScript failed then probably this install of browser was broken.

You can check HTTP headers on the server side (Apache is often configured to show this in logs) or via tunnel like tcpmon. For JavaScript use the code from JavaScript Kit page.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号