Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Firefox Mobile for developers

Compiling and testing

Instructions for building and testing Firefox Mobile can be found at https://wiki.mozilla.org/Mobile/Fennec/Android

User agent

See Gecko User Agent string reference for details on the User-Agent headers sent by Firefox on mobile devices.  For more information about user agents, please see our article on Browser Detection.

Mobile-specific APIs

There are some APIs that are specific to mobile, or are more useful to mobile.  They are listed below.

CSS for touch-specific UI elements

Mozilla supports the -moz-touch-enabled CSS media query that you can use to change CSS if you're on a touch device.  This is available and will work on Firefox for desktops as well, but is more likely to be useful for mobile devices.  You can use this to render larger buttons for people to press.

Viewport meta tag

Firefox supports the viewport meta tag on Mobile devices.  For details, see Using the viewport meta tag to improve the mobile browsing experience.

More information on the viewport meta tag can be found in the Safari reference documentation.

Note: The viewport meta tag is ignored on desktop versions of Firefox.

Media queries

CSS Media queries are supported in Firefox for desktops and mobile devices.  They can be used to change layout based on screen size and are the best way to build a UI that will work on desktops and mobile devices.

See also

Document Tags and Contributors

 Contributors to this page: Sheppy, ethertank, MattBrubeck, gps, Blizzard
 Last updated by: Sheppy,