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.
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.