[Updated: 4 March 2010]
We all know that webOS devices like the Palm Pre and Palm Pixi have a fantastic web browser that handles full web pages very well. But I've noticed that many mobile websites designed for the small screen of mobile devices don't display properly on the Pre or Pixi. To add insult to injury these same sites display perfectly on the iPhone which uses the same browser engine.
The problem is that these mobile sites do not recognize webOS devices and send them generic, unoptimized web pages that don't look good or work very well. On the other hand these sites recognize the iPhone and send it web pages that are optimized to look and work perfectly on it.
My solution is to change the browser on webOS devices so that it adds an "iPhone" tag to the identifying string it sends to web sites (along with the normal webOS and Palm device tags). This causes most web sites that don't know about webOS devices to think that it is an iPhone and send the iPhone optimized version of the web page rather than a generic unoptimized version. Since the browser on webOS devices can display the iPhone version of web pages correctly, this allows nearly all mobile web sites to display a properly working and optimized version on webOS devices even without direct support for them. Technically I accomplish this by patching a library on the Pre to modify the user agent string sent to websites. (If you don't understand that last sentence that's OK.)
Here is how the USA Today mobile web site looks before the patch:
And after the patch is applied:
You need to be able to access a root command line on your Pre to use this patch. This is very easy to do by downloading the developer's kit from Palm, putting your Pre in developer mode a running the novaterm program on your computer. See this site for complete instructions.
I and others have extensively tested this patch and it has proven to be very safe. There is a lot of error checking to make sure nothing unexpected or bad happens to your phone. However, it's a very good idea to back up your phone before doing this just in case. You may only use this patch if you accept that no one other than you yourself is responsible for any problems you may have if you try this.
How to install:
- Download the attached change-user-agent_universal.zip file to your computer. This version should work for everyone on any webOS device running any recent version of webOS on any mobile network.
- Unzip the file to reveal another file called "change-user-agent" .
- Attach your Pre to your computer using the USB cable and put the Pre in USB Drive mode.
- Copy the "change-user-agent" file to your Pre using your computer's normal method. Put the file in the root of the drive while it is in USB mode and not in a subdirectory (this ends up being the /media/internal directory from the command line).
- Access a root command line on your Pre. You can do this using Palm's "novaterm" program installed as part of the developer's kit or by using an SSH client program if you have installed an SSH server on your Pre. See this site for instruction on how to access the Linux root command line on your Pre.
- From the command line run the file. Simply type:/media/internal/change-user-agentYour Pre will reboot with the patch installed.
If you decide you would like to uninstall the patch and revert back, simply follow the above instructions and add the work "uninstall" on the command line in step #6. For example:/media/internal/change-user-agent uninstallEnjoy! If you find this useful please post a reply here to keep this thread alive so that others will see it. Thank you!
UPDATE: Now plays nice with Google Maps!
UPDATE 2: (No longer applies.)
UPDATE 3: Now the normal, safe version of the patch works perfectly with virtually every mobile web site. There is no longer any version that breaks Google Maps. Many thanks go to hofs1 for the idea that made things perfect!
UPDATE4: Should now work for Bell Canada Devices.
UPDATE5: Now the patch is a simple shell script without any binary files. It uses the 'sed' command to change the library instead. This makes the patch much more transparent and easy to understand for those that wish to audit what it is doing.
UPDATE6: Now the patch should work on any webOS device running any recent version of webOS on any mobile network. Yes, this means the patch should (hopefully) work for GSM Pre users as well as Pixi owners. Please test this as I do not have any of these devices.
UPDATE7: Updated to work on webOS 1.4. Also reworded the blurb that describes what the patch does to make it more accurate.