Android - How do I view source in the Android browser?

In Firefox or Chrome on Android it's possible to view source by prefixing the URL in the address bar with "view-source:", i.e. "view-source:http://google.com".


You can use Javascript's alert method to return the source code, type this in the address bar:

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


Look for an app called View Web Source in the market and install it.

Then when browsing, open your menu and tap "share", in the list that pops up choose View Web Source.

Tags:

Html

Browser