View Current Page Source

This shortcut shows the highlighted source of a webpage , and it must be run from a browser’s share sheet. It shows the current state of the webpage, after any changes made with JavaScript, and it does it locally, without redownloading the page. It’s also an example of the astounding possibilities of the " Run JavaScript in Safari " action. Syntax highlight via Prism (

It’s not an URL because I find annoying not being able to share my shortcuts with a description, and not being able to update them without changing URLs all the time. So I’m testing putting them in my website, with proper descriptions, and even an XML source view (yeah, the exact same one used in this shortcut :grin:).

1 Like

If you use Textastic you can simply invoke the URL textastic://url_of_webpage to open Textastic with view of current page source.

For example: textastic://

Do note however that Textastic won’t show changes triggered by any JavaScript as the above shortcut would.

I’ve been using View Source from the share sheet for years. It does allow reloadable JavaScript injection as well as access to a plethora of other information (including individual assets, DOM structure, cookie info). It does also implement search, though in an odd way. It’s referred to as highlighting (and is in what looks like the app’s share list) rather then as find or search. But it is a really useful utility, and beats the bookmarklet I used before that hands down!


Looks like a worthy $0.99 investment! Thanks for the tip

Sold me! Just downloaded.