How To View a Web Pages Source Code

How Do You View a Web Pages Source Code With a IOS Device?

I do it with a Shortcut: https://www.icloud.com/shortcuts/fc9236a1392241c18a0b6fa4e848e6cb

2 Likes

https://www.icloud.com/shortcuts/480229bf07dd42db8c20d22c010d324b

beat me to it

2 Likes

HTML Viewer Q is free in the App Store. Just enter the URL.

1 Like

WOW!! Thanks y’all. I will explore them! :tada::tada::man_dancing::sunglasses:

If you have the Textastic editor installed you can replace the http:// part of the URL in Safari with textastic:// to load the source directly into the editor.

1 Like

The most excellent Blink shell app comes with curl, so getting the page source is as easy as curl http://some.page.com

1 Like

I have a bookmark in the Safari top bar with a bit of JS magic as the address:

javascript:(function()%7Bvar%20a=window.open(‘about:blank’).document;a.write(’%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20’+location.href+’%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20/%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E’);a.close();var%20b=a.body.appendChild(a.createElement(‘pre’));b.style.overflow=‘auto’;b.style.whiteSpace=‘pre-wrap’;b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();

2 Likes