User Agents and Device Detection
When you open a web page, your web browser sends a user agent string to the server that hosts the website. This string essentially introduces your browser to the server, describing which browser version you’re using and relating other information about your computer or mobile device, such as the operating system. You can see your browser’s user agent by going to What's My User Agent?.
Device detection systems are designed to recognize user-agent strings and direct visitors based on the capabilities of each device. Because many websites use device detection to direct mobile visitors, you can’t just open the mobile versions of certain sites in a desktop browser on your computer. That’s where the User Agent Switcher comes in handy.
This plug-in for Firefox (available at User Agent Switcher) enables you to change the user agent of your web browser, effectively tricking the server into thinking that you’re using an iPhone or any other user agent you can load into the plug-in.
Because the User Agent Switcher makes it possible to visit the mobile version of a website by using a browser on a desktop computer, the switcher also makes it possible to view the source code behind those pages. This feature is especially valuable because browsers on mobile devices don't offer an option to view the source code, which is standard in desktop browsers such as Chrome, Firefox, Internet Explorer, and Safari.