How to “View Source” from Safari on an iPad or iPhone
Ever wanted to view source of a webpage from an iPad or iPhone? Unfortunately, mobile Safari doesn’t include the feature on it’s own, but with the help of a custom bookmarklet you can view source of any web page right in iOS. This awesome tip comes from Michelsen.dk, and here’s how to set it up:
- Bookmark this page (or any other) with Safari on an iPad, iPhone, or iPod touch and name it “View Source”
- Tap the Bookmark icon at the Safari new browser screen and tap on “Edit”, then tap the bookmark you saved in step 1
Now when you want to view a web pages source, open the Bookmarks menu and select “View Source”, the source code will appear in highlighted syntax with clickable source urls.
A similar tip utilizes an edited bookmark to let you run Firebug with Mobile Safari on an iPhone or iPad too, which may be a bit more useful for developers.