Active Topics

 


Reply
Thread Tools
silvermountain's Avatar
Posts: 1,359 | Thanked: 717 times | Joined on May 2009 @ ...standing right behind you...
#1
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.o...itcher.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:


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:


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)

Even more User Agents strings!!
__________________
.N810 experience: Since 6/2009
My Twenty Favorite OS2008 Applications:
AutoScan, Diablo5 Theme, Dialcentral, DragLock, EmelFM2, FlipClock, gPodder, Headphoned, Knots 2, Maemo Mapper, mPlayer, openNTPD, OpenSSH, Panucci, Personal Launcher, QuickNote, Seqretary, SlideLock, Telescope, YellowNotes
 

The Following 4 Users Say Thank You to silvermountain For This Useful Post:
Posts: 670 | Thanked: 367 times | Joined on Mar 2009
#2
Tear has an option to change the user agent. See the wiki link in my sig.

Opera Mobile also has a user agent that is respected by a number of sites. I expect that number to go up if the browser gains traction on the iPod etc.

For myself, I find it more useful when there is a URL to a mobile-friendly site rather than user agent recognition. Then I can access that site in any browser. See the other wiki link in my sig for a compilation of such URLs. Anyone can feel free to add to it.
__________________
* n810 since Feb 2009
* Most-used apps: Opera, gPodder, Panucci, Tomiku, Canola, Quasar, MaemoMapper, ATI85, Maemopad+, AisleRiot Solitaire, Anagramarama, Rapier, Gnumeric, pyRDesktop
* Mobile-friendly URLs of popular sites
 

The Following 2 Users Say Thank You to buurmas For This Useful Post:
Posts: 154 | Thanked: 73 times | Joined on Jan 2009 @ Toronto
#3
Many thanks for this helpful plugin.

Originally Posted by silvermountain View Post
If anyone have any recommendations (better ... microB UA ...) ....
(1) STRONG RECOMMENDATION TO USERS: Before ever applying the switcher, visit http://www.useragentstring.com/ on your current MicroB. Copy the string from the box at the top of that web page and paste it into a Note or somewhere else where you can find it later. This is the string to use when you want to return MicroB to its original configuration. It is quite likely to indicate versions of Linux, Gecko and Firefox different from those in the string quoted by silvermountain. This might make a difference in accessing some sites. (Most sites won't care. In fact, most sites will still load on a browser where the user agent is completely blank.)

(1b) While you are on that web page, scroll down to the bottom of the analysis. Starting with the word "Tablet", everything is marked "???", meaning that useragentstring.com can not interpret it in any meaningful way. This will also be true for other websites, with the possible exception of some with close connections to Nokia or Maemo. See (3) below.


(2) When you open chrome://useragentswitcher/content/config.html , you see an option called "Default". On the desktop version of the plugin, this brings back your original configuration. In MicroB, the related User Agent field is blank. As noted above, this is OK for most websites, but not for all. It certainly does not restore your original config.

It would be nice to copy the original string (saved as above) into the "Default" User Agent field. However, I had no luck trying to open this for editing. Instead, I added an option called "Original", copying the original string into its User Agent field and leaving all other fields blank.

Anyone who finds a way to edit the "Default" option on N800/Diablo, please post in this thread.


(3) As noted in (1b), websites can interpret the original string as far as the Firefox version, but not the rest. You can make MicroB present itself more cleanly to websites (and possibly gain access to more finicky ones) by cutting out the material that is seen as junk. The User Agent Switcher has additional fields for that material, and it is unclear why MicroB was not configured this way in the first place. I have set up an option with the following fields:
Description: MicroB
User Agent: Mozilla/5.0 ......everything as far as ....... Firefox/3.0a1
Application Name: Tablet browser
Application Version: 0.3.7
Platform: RX-34+RX-44+RX-48_DIABLO_5.2008.43-7

I'll edit this out of the post if the config ever causes problems. Your MicroB is likely to have some differences from these details.
 
Posts: 154 | Thanked: 73 times | Joined on Jan 2009 @ Toronto
#4
Originally Posted by buurmas View Post
..... when there is a URL to a mobile-friendly site rather than user agent recognition. Then I can access that site in any browser.
I wish that were true. Unfortunately, many mobile sites refuse to load if they detect a browser capable of loading the companion full-size site. Sometimes, the site's owner wants to make sure that the full-size advertisements reach as many eyes as possible. Other times, there is no obvious motive.

The Italian weather service ilMeteo is an interesting case. It has a mobile site http://mobile.ilmeteo.it/ that you can visit on a full-size browser. However, once you have visited a few(*) pages, all links take you to a page of general information, including an explanation that the mobile site is intended for users connected by GPRS, UMTS, etc. (In fact, the site discriminates according to the type of browser, not the type of connection.)

You can see another few pages of http://mobile.ilmeteo.it/ if you clear the cookie that counted the previous ones. This is a bit of a pain, made worse in MicroB by the fact that you have to clear all cookies or none, when there might be some cookies that you want to leave in place.

Both MicroB and Tear are treated as desktop browsers by this site. The iPhone spoof on MicroB is treated as a mobile browser, and any number of links can be followed without clearing cookies.


(*) I used to reckon that the site allowed visits to three pages. Either I was wrong or there has been a change. This afternoon, it allowed several pages of forecasts for the same city, but redirected me to the general info page when I tried to look up a different city. No further pages could be accessed until I cleared cookies. This was true using both MicroB and Tear on N800/Diablo.

Last edited by scaler; 2010-06-07 at 21:37.
 
Posts: 225 | Thanked: 68 times | Joined on Feb 2006
#5
does this 'faking' mean sites like iphone-adapted tvcatchup work? or the equivalent bbc iplayer etc?
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:12.