Capturing HTTP request headers from Web browsers on mobile devices gives you the information required to simulate the device in Firefox or a mobile device or browser emulator.
Here is a handy tool that allows you to easily view, cut and paste the HTTP headers sent by a Web browser on a mobile device. Follow these steps to capture HTTP headers from a mobile browser:
- Browse to http://learnto.mobi using the mobile browser.
- Select the View Request Headers link.
- Notice the HTTP request headers on the displayed Mobile Web page.
- Remember the four-digit number shown at the top and bottom of the page. (i.e. Viewing Request Headers #1234)
- Browse to the same View Request Headers page in a desktop browser (i.e. Firefox, Chrome, Safari or IE).
- Enter the saved number into the textbox at the bottom of the page. Press the Go button to view the HTTP request headers from the mobile device. (i.e. enter “1234” into the textbox.)
- Copy and save the HTTP headers for use in Firefox and mobile emulators.
Let’s look at some screenshots of this process. The following screenshot shows the location of the View Request Headers link that is clicked in Step 2 to display the HTTP headers.
The following screenshot shows the location of the four-digit number mentioned in Step 4 that is (temporarily) associated with the HTTP request headers. In this screenshot, the headers are from Firefox 3.5.
The screenshot below shows the location of the textbox from Step 6 into which the four-digit number from Step 4 is entered to call up a (recently) previously-viewed set of HTTP request headers. The HTTP request headers displayed in the screenshot are from a Motorola MB200 Cliq Android smartphone.
Once you are viewing a request headers from a mobile device in a desktop browser, simply copy and paste the headers to save them.
NOTE: The four-digit numbers assigned to HTTP request headers are temporary. They are re-assigned over time to new sets of headers. It’s important to complete the process of viewing headers on a mobile device and capturing headers using a desktop browser over a short time period, say 5 to 15 minutes.