17 October 2015

How to View Source Code of Website on Android Phone

Leave a Comment

View Source Code of Website on Android Phone

We all know websites are created using programming languages basically with HTML, JavaScript and CSS which are the building blocks of any web-page. These defines the behavior and working of any website. For an Example: All layouts, functioning and Styling are because of these languages. Now you may wonder about what source code is. In short words, it is the complete coding of any software or program ( here it refers to the coding of web-page which itself is a type of program ).

Sometime You may need to check or view source code of website and If you are Web-Developer, chances are more. This would be helpful to study website working, layout and SEO techniques. Apart from this, normal user with little known knowledge can also take advantage to learn new basic things on web-development.


It's easy to view source code on desktop browsers. You just need to right click on black space and select "view page source" option. Moreover you can also use shortcut key combination to launch it. The default key shortcut is "Ctrl+U". However it's not possible that we are on our laptop or computer each time. As we all have android phones, so the main problem is, how one can make use of it to view website coding? In this short tutorial I am going to tell you
2 different methods to view source code of website on android device. All of them are listed below. So lets begin now!

Method 1 - By Changing Website Address/URL


In this method, we will make changes in Web Address or URL. Before I start, please download google chrome app in your android device with latest version. You can download it from google play store. After this follow below steps -

1. Go to web-page whose source code you want to check.

2. Look at Site URL tab. Copy all web-address and save in text editor.

3. Now add "view-source:" before it. Your final link will be something like this -

view-source:www.facebook.com

Make sure to remove all blank spaces.

4. At last open your final link and boom! you've done it.


Source Code

Before you ask me in comment box, let me tell you that this way will not work in few browsers like UC. This method best suits for google chrome users.

Method 2 - By Using Cache Operator in Google Search


Search engines also make use of source code to index website content in search results and save them for future use. Google also follow same procedure. In my earlier tutorial on " Complete guide to google search in Advanced way", I clearly explain what cache operator refers to. Now for this time, We will use it to view source code of website as from last retrieved data. Simply follow these instructions -

1. Go to google search.

2. Now write below command in search box.

cache:your site address

For Example: cache:www.facebook.com


Cache Operator

Again, make sure to remove all blank spaces.

3. As your press enter or search button, google will redirect you to the web cache sub-domain of google user content.

Here it will display a snapshot of page as it appeared when crawled last time.


Snapshot of Web-page

4. From the top navigation menu, select "View Source" option and that's it.

View Source Using Google Webcache

I usually prefer this method as it work fine in almost all browsers including chrome, UC and Opera.

Note: This method may display quite different result as compared to original because it was retrieved from google server instead from direct website.


Final Words!


So above are the best 2 methods you can try. Use one which suits you most. Here I have one more tip. You can enable auto-rotate option from your android settings to read content in landscape mode which will provide more ease while reading. Finally if you have any question or want to suggest something, comment below and let me know.

Leave A Comment