|
Simulating Fennec on desktop
|
|
Posted by: stak
Tags: mozilla
Posted on: 2012-05-21 10:52:09
A lot of you probably know this already, but I thought I'd put it here anyway for future reference. Now that we've released Firefox for Android Beta, we're getting a lot of bug reports of various websites that behave unexpectedly or just plain don't work (this is great, keep the bugs coming!). Often it turns out that the page is just poorly designed for mobile browsers, and the problem isn't really in the browser but in the mobile-specific content that is served to us.
As one of the first steps when investigating bugs of the kind "Site X misbehaves in Fennec", I always check to see if I can reproduce the behaviour in desktop Firefox using the User Agent Switcher add-on to get the mobile-specific content. The User Agent Switcher add-on is great because it lets you modify the fields (User-Agent HTTP header and some window.navigator properties) that pages often use to do mobile detection. By using a desktop browser with Fennec UA properties, I can narrow down the scope of the bug as being a Fennec-specific bug, a Gecko core bug, or a website error.
If this is useful to you, you can get the addon here. It doesn't come with the Fennec UA settings by default, but allows import/export of settings. I have the XML file for Fennec 15.0a1 (current nightly) available for download here. I also have a page that shows you the necessary UA settings for any browser - just navigate to this page in the browser whose settings you want to see.
There is a caveat though: some websites use other forms of UA detection to serve mobile-specific content. For example, CSS3 Media Queries is one way to do it. I haven't run into too many sites that do this, but that number will (hopefully) grow, so it's something to keep in mind.
|
|
(c) Kartikaya Gupta, 2004-2024. User comments owned by their respective posters. All rights reserved.
You are accessing this website via IPv4. Consider upgrading to IPv6!
|
As a result, I'm keeping an eye on Bug 750366 (Start producing Android x86 Firefox builds) so, once it's resolved, I can just throw a copy of Fennec into the VirtualBox VM I use to test my pages in the default Android browser.