Have you ever wished you could see the HTML source of a web page while on a mobile browser, which generally doesn’t offer that feature? If you have a desktop machine around, there are ways, but what I mean is getting the source without anything but the device itself.
The little View Source tool by Neatnik does the trick.
You enter the URL in the little bar to see the source of that URL. Or add the URL to the the tool’s URL itself to link right to it. Here’s CSS-Tricks (without line wrapping and tidyied up!):
I used to use a similar bookmarklet to do this until I found the iOS app Inspect Browser which essentially gives you a webpage inspection panel that allows you to not just view and modify source but also check network requests and storage usage, etc. It’s a little bit more stripped down compare to its desktop counterparts but it’s still very impressive and in my opinion well worth the $10.
(I have no affiliation with that, I just found it a couple of days ago and want to others know about it)
Woah that’s awesome! Is there an Android equivalent does anyone know?
You can also just prefix the URL in the browser with “view-source:”, exactly like you would on Desktop.
Very interesting, thanks for the share. By the way, your “Direct Link” links back to this same page.
Wouldn’t that only be useful for chrome?
I don’t see a real use for this, I always just type ‘view-source:’ into the address bar and of course it works on mobile too.
Wow, you’re right, thanks! (Why didn’t I think of this earlier?)
exactly, I do this all the time :p
Exactly. Quicker than finding this tool.
Although on Android Chrome, I have always prepend the
view-source:to any URL to view source of that web page f.e.
Beautiful solution to a headache
Just edit the url of the mobile browser. Add “view-source:” before the https… and voalà…
You can also type
view-source:before the url.
Yergev Haham released an app a few years ago which is basically a stripped down browser that gives the option to view the page or the source code.
Very useful but I’ll try View Source too, to compare.
on android (not sure about ios) in firefox and chrome you can just prepend “view-source:” in the url to get the same behavoir as on desktop browsers
Yes! Firefox on Android used to actually have “View Source,” and I’d use it fairly often too, dangit.
I use the browser “via”. There u can see the soucecode too.
I always use Eruda for this. Execute the following bookmarklet:
Is there also a trick how I can retrieve the CSS code / CSS source on the mobile device?