Mobile Website / Printer-friendly Page Redirector


I prefer reading the mobile version of web pages (for sites that support it) or printer-friendly web pages (where available) as they load fast and are clutter-free, making reading easy.

I borrowed JavaScript code from here & there to build a simple script that takes original site links meant for a desktop browser, manipulates the URL and redirects to the equivalent mobile website or printer-friendly page or Google Mobilizer.

Try it out and adapt the code for websites which have URLs whose pattern can be manipulated to generate a web page URL for that site's mobile equivalent (with a m. subdomain) or for printer-friendly web pages.

For instance, a typical new article from The Economic Times has a URL like this:
http://economictimes.indiatimes.com/news/international-business/mexico-nears-junk-food-tax-sets-anti-obesity-plan/articleshow/25020454.cms

The URL for the same article when you view it from their mobile website is:
http://m.economictimes.com/news/international-business/mexico-nears-junk-food-tax-sets-anti-obesity-plan/articleshow/25020454.cms

By creating a simple web page locally and adapting the script mentioned above, you can use the redirection technique for other sites as well. The script uses regular expressions to move fragments of the URL around.

If you find configurable URL patterns (like the one shown above) for popular websites, please leave a note in the comments section.

Comments