18

I have used Google Chrome, UC Browser, Opera Mini but I haven't found a way to use any of these browsers to view the source of a web page.

I need an Android web browser or any other software that can view page source like I would do on PC.

1
  • 2
    Hmm. Does it have to be a web browser? There are apps for this.
    – Seth
    Feb 7, 2014 at 0:29

4 Answers 4

14

Been a while since I did but last time I used it (and don't usually use smart phone - was on a friend's) I could (IIRC) type view-source:<address>.

On a quick look over at android SE I see this answer (ie did a quick search with view-source to confirm I wasn't remembering incorrectly) which suggests view source addon for firefox. To be clear: I haven't used this addon so I can't say really review it but it probably would work good if you don't want to be typing view-source:

On the BlueStacks emulator (since I don't use a smart phone - live outside of cell service anyways so what's the point): screenshot

(A): just type view-source: at the start of the address. I can't recall whether with a REAL smartphone it does this but at least on the emulator it doesn't show the view-source: except in address bar edit mode.

(B): and there you have the source code.

1
  • 1
    I can confirm that the Google Chrome browser does let you view the source with that method (although I'm not aware of any way to get there via UI, I think you just have to go there manually).
    – animuson
    Feb 7, 2014 at 2:18
2

VT View Source

I have found this helpfull in the past. It provides good UI and code highlighting. Though it supports word wrap, it is still not that usefull unless you have a device with good screen space.

1
  • 1
    could you add a screenshot and maybe elaborate a bit more about why this product is good? Is it intutive to use? Fast and responsive? Or does it have any drawbacks that should be noted? Feb 9, 2014 at 18:08
0

In android, with both Mozilla Firefox and Google Chrome, you can immediately view any website source code, but in some other web browsers it takes one more step.

To view the source code in other browsers, simply add "view-source: at the beginning of the URL.

Example: view-source://facebook.com

2
  • That didn't work for me on Android 10 in Chrome on 19 Aug 2022. Aug 19, 2022 at 19:33
  • It didn't work on Firefox, either. Aug 19, 2022 at 19:46
0

What I do to accomplish that is install Termux and then wget the URL (or use requests.get(myURL).text in Python).

However, to answer the question, there is a web browser on Android that can do it! It's Links (on Termux). When you're browsing, just press \ and it'll turn the page into its source code; press it again and it'll change back.

Note that I'm talking about Links--not Lynx. However, I just checked, and Lynx does it, too (but Links does it faster and it seems nicer). These are both command-line web browsers.

To install these things on Termux, do such as this:

  • pkg install links lynx python wget

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.