_HowTo_ useragents
UA = UserAgent
When you open the
menu Help > About K-Meleon you can check how the browser identifies itself towards websites.
Claiming to be another browser and/or system is the usual trick when a website won't let someone in, for no real reason. Doesn't work always, but in most cases
For example you want to see a mobile website, but the browser tells the server that it's a desktop browser. Most smaller sites don't care because they send the same pages to all browsers anyway. But some major websites are 'clever', and send "automatically" (or stubbornly) to all desktop browsers always the desktop layout too, even if they called the mobile URL. Some sites have a little link somewhere to switch to the desktop version or to the mobile version manually, but not all.
To persuade such sites to send you the mobile version anyway, it usually helps to fake the browser UserAgent and claim to be, for example, a windows phone:
Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)
My personal favorite just for reading, NOT for scripts, is ancient IE7 on XP, because nowadays this often gets delivered old "classic" or mobile layouts too. Those are much lighter, good for weak machines. But only use if you KNOW what you're doing (=important scripts and functions may not work with IE7)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
To fake the UserAgent globally, for "all normal" sites, the fake string must be in this pref, which you can check on about:config:
general.useragent.override = Mozilla...
This global string is usually toggled by a macro menu.
If it doesn't exist, the browser sends the normal default string.
But most sites don't need a fully faked string. All they look for is a major browser name to decide which page version to send you, either for Chrome, Firefox, Safari or Edge, the major ones. In such easy cases it helps to toggle the
Firefox Compatibility pref, which just appends a fake "Firefox" version to the default UA.
In
KM-Goanna76.x this pref is:
general.useragent.compatMode = 2 (type INT, 0=pure KM, 1=gecko, 2=firefox)
In old KM74-76 Gecko, and KG74 it's different: general.useragent.compatMode.firefox = true
Most users keep this setting permanently.
This setting is usually toggled by a macro menu too.
Special cases:
If you visit a certain site often, which does need a fully faked string, it's bothersome to always toggle the UA manually. In such cases you can
STORE site-specific useragents, which KM will then send automatically whenever you visit that site.
For example to automatically send to "mobile.twitter.com" another UA-string as your usual one, KM-Goanna (74+76) can store those in such a pref:
general.useragent.override.mobile.twitter.com = Mozilla...
And because browser developers want to make things easier for users, browsers can come with a bunch of
PREDEFINED site UAs included already out-of-box. For some well known major websites, which only work correctly with certain UA strings. Sometimes those strings can be quite tricky to figure out. Some websites want a Chrome string, others a Firefox string, the next one plain refuses to send videos if the string declares to come from an XP-system, etc.
Those predefined strings save a lot of trouble, the only catch is:
those websites often change their code, and the predefined UA stops working.
But most users aren't even aware they are sending those websites a special string, and can't figure out what's wrong.
All SITE UAs can be checked on about:config too.
Just open "about:config" page and filter for "agent" to see all settings related to UA stuff.
If you reset a Site-UA but it won't go away, it's one of those predefined inside omni.ja
To disable it, do not reset it on about:config, only give it an empty value. Then KM will ignore this line.
Another possibility is that you defined it yourself as "default" pref, in a file in ..K-Meleon/browser/defaults/preferences, or perhaps in ..KM/defaults/pref. Then change or delete it there.
HUGE PROB:
Dorian once decided to remove the old useragents macro, which could toggle the global UA, hoping that the Firefox Compat setting would suffice. Of course, it did not.
But the site-specific websites work anyway, only most users have no clue this happens or how to fake the UA manually now.
I strongly recommand to install the
updated macro useragents2018:
http://kmeleonbrowser.org/forum/read.php?9,143898
The menu covers all options for all KM-versions, incl. site-UAs.
(Users of PRO and others who find this quirky pref in their about:config, must set it to zero to allow the native functions to work:
kmeleon.privacy.useragent.Count = 0 )
You need 2 files:
the macro file of course, goes into the macros folder:
http://kmeleonbrowser.org/forum/file.php?9,file=1766,filename=useragents2018_v2.01b.7z
And a list of UA-strings for the MENU, to choose the GLOBAL UA pref.
A little example-list from last year, goes into ../K-Meleon/browser/defaults/preferences:
http://kmeleonbrowser.org/forum/file.php?9,file=1593,filename=useragents2018.js
Then restart and find the menu in "Tools".
Or unhide the toolbar button in toolbars.cfg
If you know all this long since and were just confused by the cryptic UA abbreviation, never mind. It may help some future readers too
Edited 4 time(s). Last edit at 07/25/2019 07:23AM by siria.