silvermountain
05-11-2010, 11:55 PM
Disclaimers
1) There's a number of ways to make sites think you are using a certain device/browser - this is just one.
2) All things below were tested on an N810 running Diablo
3) If anything in the below messes up your browser don't blame me - it works for me but I am much more of a user than a developer
What is this about?
Sometimes I want to go to certain iPhone optimized sites...only for them to recognize my device as non-iPhone.
The way sites does this is that they look at a useragent string that tells the site what you are using.
This useragent string can be 'faked' in various ways.
This is one that I find to be pretty easy to use, and if need be I can keep a number of 'profiles' around and switch to with a click.
Well then Mr Smartypants, how do I install this?
1) Go to this site: http://browser-extras.garage.maemo.org/news/
where you will install this: http://browser-extras.garage.maemo.org/install/webaddon-useragentswitcher.install
This basically adds a userswitching addon to your microB browser (or, I believe, any browser on a FF engine).
(Also follow the extra instructions on that site about closing down the browser, etc).
If you now go into >Tools>Components in your microB browser it should look something like this:
http://posterous.com/getfile/files.posterous.com/p-rksft/JYf0PpWxmrLxW1HLB2ERihSJ81lhPMOA1aoJFM7kwSEoS25dTK FNmnTKq6Mg/screenshot38.png
2) Add a bookmark to this site: chrome://useragentswitcher/content/config.html
You are now basically done.
Well, how do I USE it?
When you go to the site you just bookmarked in step 2 above, you can choose whatever browser you 'want to act as'. It's really as simple as that.
If you want to ADD a browser that is not there already just google around for useragent strings for that particular browser..and add it by clicking the Add.. button.
Example: One oldish string to fake an iPhone is:
Mozilla/5.0 (N8x0 like iPhone; U; Linux like Mac OS X; ARM; en) AppleWebkit/420+ (Gecko, like KHTML)
Ok, I THINK I just changed to faking another browser, how do I test it?
Easiest way: go to www.useragentstring.com - it will tell you what a site will think you are running.
Example:
http://browser-extras.garage.maemo.org/news/8/uas-ie.png
I think I messed up somehow...uh...how do I get back to how it was before you tricked me into trying this shite without telling me I could mess stuff up you frikkn bastard?!?
Orignal UA string for microB is:
Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2a1pre) Gecko/20090514 Firefox/3.0 Tablet browser 0.9.7 RX-34
Are you as hot, clever and humble as you sound?
Yes, yes I am.
If anyone have any recommendations/corrections (better iPhone or microB UA I'd be happy to update this with that information).
Additional:
List of UserAgent strings (including microB, etc) (http://user-agent-string.info/list-of-ua)
Even more User Agents strings!! (http://useragentstring.com/pages/useragentstring.php)
1) There's a number of ways to make sites think you are using a certain device/browser - this is just one.
2) All things below were tested on an N810 running Diablo
3) If anything in the below messes up your browser don't blame me - it works for me but I am much more of a user than a developer
What is this about?
Sometimes I want to go to certain iPhone optimized sites...only for them to recognize my device as non-iPhone.
The way sites does this is that they look at a useragent string that tells the site what you are using.
This useragent string can be 'faked' in various ways.
This is one that I find to be pretty easy to use, and if need be I can keep a number of 'profiles' around and switch to with a click.
Well then Mr Smartypants, how do I install this?
1) Go to this site: http://browser-extras.garage.maemo.org/news/
where you will install this: http://browser-extras.garage.maemo.org/install/webaddon-useragentswitcher.install
This basically adds a userswitching addon to your microB browser (or, I believe, any browser on a FF engine).
(Also follow the extra instructions on that site about closing down the browser, etc).
If you now go into >Tools>Components in your microB browser it should look something like this:
http://posterous.com/getfile/files.posterous.com/p-rksft/JYf0PpWxmrLxW1HLB2ERihSJ81lhPMOA1aoJFM7kwSEoS25dTK FNmnTKq6Mg/screenshot38.png
2) Add a bookmark to this site: chrome://useragentswitcher/content/config.html
You are now basically done.
Well, how do I USE it?
When you go to the site you just bookmarked in step 2 above, you can choose whatever browser you 'want to act as'. It's really as simple as that.
If you want to ADD a browser that is not there already just google around for useragent strings for that particular browser..and add it by clicking the Add.. button.
Example: One oldish string to fake an iPhone is:
Mozilla/5.0 (N8x0 like iPhone; U; Linux like Mac OS X; ARM; en) AppleWebkit/420+ (Gecko, like KHTML)
Ok, I THINK I just changed to faking another browser, how do I test it?
Easiest way: go to www.useragentstring.com - it will tell you what a site will think you are running.
Example:
http://browser-extras.garage.maemo.org/news/8/uas-ie.png
I think I messed up somehow...uh...how do I get back to how it was before you tricked me into trying this shite without telling me I could mess stuff up you frikkn bastard?!?
Orignal UA string for microB is:
Mozilla/5.0 (X11; U; Linux armv7l; en-GB; rv:1.9.2a1pre) Gecko/20090514 Firefox/3.0 Tablet browser 0.9.7 RX-34
Are you as hot, clever and humble as you sound?
Yes, yes I am.
If anyone have any recommendations/corrections (better iPhone or microB UA I'd be happy to update this with that information).
Additional:
List of UserAgent strings (including microB, etc) (http://user-agent-string.info/list-of-ua)
Even more User Agents strings!! (http://useragentstring.com/pages/useragentstring.php)