Connect with us

How To View Website Source on iPad and iPhone


Apple iPad

How To View Website Source on iPad and iPhone

iPad has grown as one of the best and most popular tablet available in the market today. iPad comes with the default mobile Safari browser which is also shipped with iPhone. One of the main drawbacks of mobile browsers is that they have lesser options and one of the missing option is view source. If you are a web developer testing your web designs in mobile browsers, you might want to check the source for the webpages.

By default there is no option to view source in iPad or iPhone, but it can be done using a simple bookmarklet created by RavelRumba.

How to View Source in iPad/ iPhone:

To get started, first create a bookmark by adding any webpage, this can be done by opening any page and clicking on the bookmark button. Now save the bookmark with any name, preferably something like “View source” so as to identify it easily. Now go to this URL and copy the entire script. Now open Bookmarks once again and edit the bookmark whcih we created now.

In the URL area, paste the Javascript copied. Now save the bookmarks once again.

View source added

Now on, to view source of any website, open the website and click on the bookmark “View source”or whatever name you gave.

Open source

This will open the source code of the website in another tab.

Source code

A few things to note:

  • The source you’ll see is the DOM source (“generated source”), not the original HTML source.
  • The ends of some very long strings are partly hidden from view.
  • It works well on the iPad but on the iPhone the text wrapping does not work as well (the ends of more lines are cut off).
  • It should work in any browser that supports the white-space value pre-wrap. But I’ve only tested on iPad, iPhone, and Opera Mini on the iPhone.
  • For some reason the source code output is not fully selectable. You can Select All but you cannot define segments to select.
Continue Reading
Advertisement

Nirmal is a Technology Blogger and a Microsoft MVP in Windows. He can be contacted at nirmal@nirmaltv.com. You can find Nirmal on , and .

1 Comment

1 Comment

  1. Sree Raj

    July 7, 2012 at 11:49 am

    Useful Stuff !

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More in Apple iPad

Recent Articles

Advertisement

Trending Articles

Latest in Windows 10

Subscribe to YouTube Channel

Like Us on Facebook

Sponsors

sponsors
To Top