Tip: View Source Code On Mobile Devices

All of you are probably aware of what the source code of a webpage is. It is the raw HTML code that web browser interpret to display elements like text, images, formatting, spacing and multimedia.

Very often you might want to view the source code of a website directly — for example when doing a security check to ensure there are no hidden or malicious lines of code there, or when testing a plugin or a new script that you have just installed.

Viewing the source code on desktop browsers is easy.

One most browsers you will just have to right click with the mouse and select the “View Page Source” option or something similar, and the lines of code will be displayed in a window.

However, this method might not work in all instances. For example, when connecting via a terminal window without a mouse, and particularly when using a mobile web browser.

There is a simple trick to find your way through this, though.

Just type “view-source:” on the URL before the domain name. It works for the home pages of websites, as well as any internal page. Just type this, and your mobile browser will display the source code directly. It works on popular browsers like Google Chrome and Mozilla Firefox, and most others.

A simple trick to remember, you never know when it might come in handy.

Leave a Comment Below

  1. Great and easy tip. Unfortunately, the world we live in requires us to check the source code once in a while. Thanks for helping us ensure our browsing safety.

  2. BeckyMouse says:

    Very smart to do this, but how often do mobile attacks occur from source code? Do you have any data to show how often this may occur? I wonder what that number looks like. I assume it’s rising as mobile browsing becomes more prevalent.

    • I wondered the same thing when reading this. I’d love to see some data to see just how often this is happening. I don’t doubt it’s happening, I’d just like more info on it.

  3. Is there a certain Phone OS or Phone browser that’s more susceptible to this than another? I’d love to see a breakdown on that at this point.

Leave a Reply