mail this page
products | company | support | training | contact us
OK we admit it - the above is a cheap one line trick using apache SSIs.
We produced this page not because we think changing browser User Agent strings is a good idea - in fact we think it is an incredibly bad idea unless you absolutely need to do it (some sites do not display well, or even at all, if they fail to recognize your browser). But we got mail recently saying someone was having a problem viewing our pages. Turns out it was a badly configured - not deliberately cloaked - UA string. So we got to thinking how could we help fix the problem - and as usual we had no idea! We use server-side browser sniffing to serve browser specific page content - mostly 'cos we want to progressively phase out - or a least minimise - development for non-W3C conformant browsers while pushing ahead with conformant browsers (truth be told we used to feel very strongly about this until the great HTML5 betrayal. Now - meh). Depending on which browser you use you will see a different ZyTrax site - well at least as far as navigation is concerned. 'Nuff said. So here for Opera, Moz and the clones, which unless identified specifically includes Firefox, K-Meleon (great stuff), Galeon, Epiphany etc., etc. and, of course, MSIE and Chrome is some info about changing UA strings.
In Opera 11 you have to make a Panel visible by clicking the < button at the bottom left of the browser window. Then click the + symbol from the Panel and choose 'Customize...'. In the window that opens select the 'Button' tab then 'Preferences' and drag the 'Identify as Opera' combo box onto the top browser bar. It provides three options: Identify as Opera; Identify as Firefox; Identify as Internet Explorer.
Opera 9 Removed browser change from the Quick Preferences menu - instead use Tools->Quick Preferences->Edit Site Preferences->Select Network Tab->Use Browser Identification combo box.
Opera 7+ provides a feature to change the UA string from the menu:
Use Tools->Quick Preference and select the browser you want to emulate from the radio button list at the foot of the menu. Or if you like lots of clicking use Tools->Preferences->network then select from the drop down menu under 'Browser Identification'.
Opera 9 Removed browser change from Quick Preferences menu - instead use Tools->Quick Preferences->Edit Site Preferences->Select Network Tab->Use Browser Identification combo box.
Opera 7 & 8 default to MSIE identification - which means on our site you will not get our great css menus unless you change to a Moz string - and they have worked perfectly since Opera 7.54. Opera 9 defaults to Opera identification.
Even if you select MSIE (and we assume Mozilla) you get a Opera x.yy string at the end - which some sites object to - not us we just ignore it, actually we ignore most things. You can remove even this vestigial (wow!) string in Opera 8 but not Opera 7. Opera call this cloaked mode. Cloaked mode can only be configured by using the ua.ini file discussed below and it can even be set on a site-by-site basis.
From Opera 8 there is a nifty file called ua.ini (in the same directory as your Opera profile - typically %SystemRoot%\accountname\Application Data\Opera\Opera\profile\ua.ini) in which you can specify any string, including a cloaked string, for either Mozilla or MSIE on a site by site basis (Opera info on this topic - under miscellaneous). Note: if you set a value in the ua.ini file it trumps the menu setting to change identifier. Clicking the menu setting until your fingers bleed will have no effect - the value from the ua.ini will always be used depending on what values you set. The default values in this file are clearly set based on reported site problems. Annotated ua.ini file.
The change UA features provided by these versions are extremely flexible and safe to use. To invoke the feature press the F12 key in any page (or click the '*' button on the top extreme right and select 'F12 Developer Tools'). From the resulting window click the Tools menu, select 'Change user agent string' and select a canned string from those provided (various MSIE versions, FF, Chrome, Opera and Bing) or select 'Custom..' which allows you to define any string that will subsequently be added to the available menu. A very comprehensive feature set and relatively easy to use.
The basic UA string cannot be changed. Any additional values displayed in the MSIE UA string are defined in the registry. Use Start->Run enter regedit then navigate to the following key:
HKEY_LOCAL_MACHINE\software\Microsoft\Windows\CurrentVersion\ Internet Settings\User Agent
Adding new strings here will cause the name of the field - not the data content to be appended to the UA string. The basic string is left intact.
To change the basic string add (if not present) the following key:
HKEY_LOCAL_MACHINE\software\Microsoft\Windows\CurrentVersion\ Internet Settings\5.0\User Agent (default) "Mozilla/4.0" Compatible "compatible" Version "MSIE 6.0" Platform "Windows NT 4.0"
The default value will replace the Mozilla/4.0 string that MSIE uses. You can add Compatible, Version and Platform strings as shown above and described in this MSDN article. The article also explains how to add Post Platform and Pre Platform values.
Warning: Messing around with the registry can seriously damage your system and your mental health. Do not do do it unless you know exactly what you are doing. Then think twice.
Enter about:config in the address line and it will display a full list of the variables used. In the filter line type useragent - and if you are lucky there will be a string identified with general.useragent.override - to modify just double click the entry and make your required changes.
However in a standard Firefox install this variable is not present so you will have to add it to the Prefs.js file in your profile directory.
Chrome (as of version 26) provides an updated sneaky (in the sense that it is well hidden) and broken (does not work) method to change the UA. Click the Customize and Control icon (now 3 lines - good to see google constantly improving their UI to make it more intuitive) in the top right of the main window and select Tools-> Developer Tools from the menus. This opens a split screen at the bottom of the page. Click the settings icon (a gear icon on the extreme bottom right - just to keep you guessing), click Overrides on left hand menu, then check User Agent and select your favorite (should that be least objectionable) browser ID string from the combo box. And all of this has no effect - it does not work. It is broken, non-functional, ineffective and does nothing. It could even be called a bug (it also creates some very strange string based on the combo box selection but this could be a further reflection of its brokeness).
Chrome (as of version 17) provides a sneaky (in the sense that it is well hidden) method to change the UA. Click the Customize and Control icon (a spanner) in the top right of the main window and select Tools-> Developer Tools from the menus. This opens a split screen at the bottom of the page. Click the settings icon (a gear icon on the extreme bottom right - just to keep you guessing), check Override User Agent and select your favorite (should that be least objectionable) browser ID string from the combo box.
Bizarrely, Chrome (as of version 11) does not offer any easy way to modify its UA string. Instead you have to use a command line switch of the form "--user-agent="replacement string". Equally bizarrely, on Windows Chrome's executable (chrome.exe) does not reside in the normal Program Files or Program Files (x86) directories instead it resides in Users\username\AppData\Local\Google\Chrome\Application (Vista and Windows 7) and which apparently translates to Documents and Settings\username\Local Settings\Application Data\Google\Chrome in XP. You either need to open a command prompt window, navigate to the above location and then enter chome.exe --user-agent="string" (life is too short to do that twice) or create a shortcut to chrome.exe in the above directory and edit the short cut (right click, select properties) and add the appropriate --user-agent="string", then rename the shorcut to reflect the browser string and drag it onto your desktop or some equally appropriate place. Repeat as often as needed to cover your favorite alternative strings.
Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.
Dec > Hex > Bin
data rate stuff
If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C STANDARDS COMPLIANT browser such as Mozilla