-13 Votes

Show HTML Source Code in Mobile Android Browser

Info by Anja Proggy | 2014-06-11 at 15:49

As web developer, of course, I am constantly interested in the source code behind, when discovering and exciting website. And not only when sitting at the desktop computer at home!

Also when surfing the web on my smartphone, sometimes, I would like to have a look at the sources.

First, I thought, that this is not possible. I thought, the developers of the smartphone browsers are not providing any possibility to glance at the HTML. Of course, this would fit the current development making the user more and more unaware of the technical details, but I have nevertheless found some solutions. Here are the possibilities.

Firefox

For the mobile Android Firefox browser, there is the convenient extension "View Source Mobile" available. After you have installed this Add-On, the normally menu is extended by the entry "View Source". Here is the link to this Add-On.

Chrome

It is also possible to show the HTML source code using the mobile Chrome browser. Just add "view-source:" to the normal URL in the address bar. For example, "view-source:http://www.example.com" to show the HTML of "example.com". This trick is also working in Firefox, Syntax-Highlighting included.

JavaScript Solution

If you cannot use one of the other methods, you can just fall back to the Java Script solution:

javascript:alert(document.getElementsByTagName('html')[0].innerHTML);

When typing this into the address bar, the HTML code is shown.

If you should know other possibilities of showing the HTML, fell free to write a comment.

ReplyPositiveNegative

About the Author

AvatarThe author has not added a profile short description yet.
Show Profile

 

Related Topics

Hide HTML Source Code

Question | 1 Answer

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.