Learn About The Web

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.