Jump to content

Disabling browser ID as mobile device?


Guest popetodd

Recommended Posts

Guest popetodd

Hi all,

I have been mildly annoyed a few times now by the Streak browser identification as a mobile browser forcing me to redirect to mobile versions of various sites: Google, GMail, BBC and a few others so far with many more to be discovered in the future I am sure.

I am positive it will happen for any site that uses the browser agent header to determine the site layout to serve.

This may be fine (in fact desirable as far as I am concerned) for a smaller device with limited screen real estate, but for this bit of kit it's just annoying.

I've poked around to see if I can find some way to disable or change the browser agent response without success, does anyone out there have the answer for this? I just can't see wasting this beautiful machines obvious talent for displaying full web pages unaltered just because the browser was originally designed for a dinky inadequate screen.

Cheers!

Edited by popetodd
Link to comment
Share on other sites

Guest crapbag172
Hi all,

I have been mildly annoyed a few times now by the Streak browser identification as a mobile browser forcing me to redirect to mobile versions of various sites: Google, GMail, BBC and a few others so far with many more to be discovered in the future I am sure.

I am positive it will happen for any site that users the browser agent header to determine the site layout to serve.

This may be fine (in fact desirable as far as I am concerned) for a smaller device with limited screen real estate, but for this bit of kit it's just annoying.

I've poked around to see if I can find some way to disable or change the browser agent response without success, does anyone out there have the answer for this? I just can't see wasting this beautiful machines obvious talent for displaying full web pages unaltered just because the browser was originally designed for a dinky inadequate screen.

Cheers!

+1

Link to comment
Share on other sites

Guest courtlandre
have you tried using sky fire or another browser that has multiple user agent I.D's.

Even using dolphin set as desktop it acts as a mobile.

Link to comment
Share on other sites

Guest popetodd
have you tried using sky fire or another browser that has multiple user agent I.D's.

I was hoping that there would be a way to set this in the default browser, it is a rather quick interface and it does quite well.

I've used Opera on HW6945, it was better than the default WM5 IE but not as nice as even the default on the Streak.

I've also tried SkyFire, I uninstalled that after less than an hour of usage.

Now that I know Dolphin won't cut it either no use trying that one out.

Link to comment
Share on other sites

Guest craigdabbs
I was hoping that there would be a way to set this in the default browser, it is a rather quick interface and it does quite well.

I've used Opera on HW6945, it was better than the default WM5 IE but not as nice as even the default on the Streak.

I've also tried SkyFire, I uninstalled that after less than an hour of usage.

Now that I know Dolphin won't cut it either no use trying that one out.

Try this, seemed to work for me. check using the bbc.co.uk website

http://androidforums.com/sprint-htc-hero/2...id-browser.html

Link to comment
Share on other sites

Guest popetodd

I found a config file in /data/data/com.android_browser/shared_prefs/ named com.android.browser_preferences.xml that looked to fit the bill, contained in the file is:

<string name="user_agent">1</string>

According to some of the sources I have found this is the correct setting for sending desktop UA strings (0 would be mobile device).

But a test change to "0" and a restart of the browser and the file get's overwritten and the value is set back to "1" even though the browser still advertises that it is a mobile device.

I think the correct config may be contained in the /data/data/com.android.browser/databases/browser.db.

[EDIT] Nope. Got sqlite and poked around in it and found no config info. Maybe it's contained in the apps jar file?

I am assuming that the apps are Java based and not some native code format from the dev interface I've been looking over.

[EDIT] Worked out what the /data/data/com.android_browser/shared_prefs/com.android.browser_preferences.xml file is about:

it is the config that loads in debug mode. I added the following line to it:

<string name="default_ua_string">Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10</string>

And when not in debug www.whatsmyuseragent.com shows me to be sending the stock mobile string but when I enable debug the string I added in to that file myself shows up.

I also have found that the BrowserSettings.java is what contains the default string, I am not skilled enough to correct this file and place it in the proper spot. Oh well, perhaps a project for someone more annoyed than I am by this.

Cheers!

Edited by popetodd
Link to comment
Share on other sites

  • 2 weeks later...
Guest popetodd

Now that the kitchen is open that BrowserSettings.java file could be tweaked to it's proper form in the ROM?

That would be a nice little fix for a custom ROM.

Edited by popetodd
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.