Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Learn More

I need to change Operating System detected via JavaScript

  • 6 отговора
  • 1 има този проблем
  • 760 изгледи
  • Последен отговор от cor-el

more options

I used browserspy(http://browserspy.dk/os.php) to see my OS detected via JavaScript (OS CPU detected via JavaScript:Windows NT 6.1; WOW66 ).

I don't need to change User Agent. I managed this with add-on. I used this add-on also to change User Agent for JavaScript : https://addons.mozilla.org/en-US/firefox/addon/user-agent-js-fixer/

It is working i checked on browserspy.dk

But i have problem with operating system. If i change my User Agent to Windows NT 6.2, there will be still Windows NT 6.1; WOW66 detected via JavaScript. The User Agent detected via Java Script will be the right one. So the problem is Operating System.

Can you help me with this one? Can i change it somehow?

I used browserspy(http://browserspy.dk/os.php) to see my OS detected via JavaScript (OS CPU detected via JavaScript:Windows NT 6.1; WOW66 ). I don't need to change User Agent. I managed this with add-on. I used this add-on also to change User Agent for JavaScript : https://addons.mozilla.org/en-US/firefox/addon/user-agent-js-fixer/ It is working i checked on browserspy.dk But i have problem with operating system. If i change my User Agent to Windows NT 6.2, there will be still Windows NT 6.1; WOW66 detected via JavaScript. The User Agent detected via Java Script will be the right one. So the problem is Operating System. Can you help me with this one? Can i change it somehow?

Избрано решение

You can create a new string pref on the about:config page.

Type about:config in the location (address) bar and press the "Enter" key to open the about:config page, just like you open a website by typing the URL in the location bar.

  • If you see a warning message then you can confirm that you want to access the about:config page.
  • use the Search bar at the top of the about:config page to locate preferences more easily
  • preferences that have been modified and do not have the default value show as bold (user set)
  • preferences that are user set (bold) can be reset to the default value via the right-click context menu
  • preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean) or by double-clicking the line with the pref
  • preferences can be created via the right-click context menu: New -> String, Integer, Boolean
Прочетете този отговор в контекста 👍 2

Всички отговори (6)

more options

Note that changing the user agent via an extension probably doesn't change the user agent as detected via JavaScript (navigator.userAgent).
That only affects the user agent as send via the HTTP request headers.

You can check that if you open the Web Console (Web Developer > Web Console;Ctrl+Shift+K) and type navigator. on the command line and select userAgent from the list that opens.

You can set the OS via the general.oscpu.override pref and you can also consider the general.platform.override pref.

more options

changing the useragent this way should also affect navigator.userAgent since firefox 19 (bug #800157).

more options

It doesn't work for me in Firefox 19, but does in the current Firefox 20 beta, so it looks that this didn't land on the Firefox 19 branch.

more options

strange, according to the last few comments this should even have been uplifted to firefox 17 &18...

more options

Well it is working there, i did this with user agent switcher add-on and user agent java script add-on and my user agent is changed. I just need to change my OS. Can you help me with:

You can set the OS via the general.oscpu.override pref and you can also consider the general.platform.override pref.

Where i need to change this, in Web Console? I am sorry but i don't know anything about so please be more specific.

Променено на от lukc18

more options

Избрано решение

You can create a new string pref on the about:config page.

Type about:config in the location (address) bar and press the "Enter" key to open the about:config page, just like you open a website by typing the URL in the location bar.

  • If you see a warning message then you can confirm that you want to access the about:config page.
  • use the Search bar at the top of the about:config page to locate preferences more easily
  • preferences that have been modified and do not have the default value show as bold (user set)
  • preferences that are user set (bold) can be reset to the default value via the right-click context menu
  • preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean) or by double-clicking the line with the pref
  • preferences can be created via the right-click context menu: New -> String, Integer, Boolean