Main Content:

Fix Dumb Sites: Spoof Browser UserAgent for Firefox/Mozilla Branch/Trunk Builds

Spoof your Firefox branch/trunk build's useragent to get Yahoo Mail & other to work.

Basically we'll be leveraging the "general.useragent.extra" prefix, which adds "extra" values to the user agent.  We'll be adding one that tells most dumb UA detection schemas that we're really "Firefox/3.5" *wink* *wink*, *nudge* *nudge*.

While you can use the User Agent Switcher extension, you'll have to keep flipping to use your current test build id's, etc for bug reporting.  Instead this hack will give you the best of both worlds, no not the Miley Cyrus/Hannah Montana kind.

Instructions:
- in your location bar type and press enter:
about:config

- accept the "I understand what I'm doing" warning if you haven't already

- right-click anywhere on that page and select String from the New Menu

- copy the string below and paste it in and click ok (note: you can change "likefirefox" to anything you want):
general.useragent.extra.likefirefox

- copy the string below and paste it in and click ok:
Firefox/3.5

And that's it (see pic for end result), so what does this do, it adds the string, here's my before and after useragent string.

Before:
Code:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2pre) Gecko/20090724 Shiretoko/3.5.2pre

After:
Code:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2pre) Gecko/20090724 Shiretoko/3.5.2pre Firefox/3.5

Hope this helps someone out there.

« Last Edit: July 24, 2009, 07:55:42 PM by mrtech »



• mel reyesBlogPlaxoLinkedInTwitter
Support mrtech.com get our toolbar

July 24, 2009, 07:50:28 PM

About The Author

  • mrtech
  • Administrator
  • Posts: I am a geek!!
  • Email WWW

Comments

Add a Comment

Only registered members can post comments, please click here to register.

Pages: [1]