Today in Firefox (and Chrome) for Android I can pre-pend view-source:
to a URL in the address bar and see the HTML source code for the page.
As a developer, this is a great tool for quick on-the-fly debugging, getting anchor links, getting resources links, or otherwise trying to understand or address issues / features on a page without having to rely on emulators or otherwise hook up a laptop for dev tools.
When a user pre-pends view-source:
to a URL in the address bar, show the underlying HTML source code in the same tab (adding that view into the history object).
I should have referenced https://github.com/mozilla-mobile/fenix/issues/3710, which appears to be asking for the same goal but via a menu. If these are the same then apologies for the noise.
The button in Fennec/desktop Firefox does a few additional things (like I think trying to preferentially load the displayed page from the cache, plus definitively enabling the context menu for enabling/disabling syntax highlighting, word wrapping, etc.) and would of course be more comfortable, but manually prepending view-source:
should of course work, too.
This is a plain bug raher than a feature request.
Any mobile or desktop browser handles the view-source:
protocol AFAIK.
Yes, Every Browser has view-source feature, its a bug rather than feature request
Every major web browser on both desktop and mobile handles view-source, it's a basic web browsing feature. Sometimes viewing source is the only way to access content on certain web pages. Releasing Fenix without it is inexcusable, and it's also a big regression from Fennec, which even has a dedicated menu item for it.
Seems like this issue is "low priority" for Mozilla, which means that they may keep ignoring it indefinitely.
Please put view-source on your list. Right now I have a problem with https://www.certitudes.org/ and I need this.
@rickrich if you need to see the source as it's served on mobile, please try remotedebug https://developer.mozilla.org/en-US/docs/Tools/about:debugging
@andreicristianpetcu, I appreciate the suggestion to use remote debugging, but it does not address the case(s) I outlined when I opened this issue:
As a developer, this is a great tool for quick on-the-fly debugging, getting anchor links, getting resources links, or otherwise trying to understand or address issues / features on a page without having to rely on emulators or otherwise hook up a laptop for dev tools.
It has been particularly handy when I am on the road, and as pandemic lockdowns start to loosen that will be happening again.
What can we do to move this feature up the list? I relied on it often and hope for it to come back.
I do not want to have to rely on Chrome on my mobile to do this.
@andreasbovens I agree with @aardrian remotedebug is not sufficient as a resolution. There are many reasons view source is part of normal use in any other browser and previous versions. Remotedebug is not a sufficient replacement for this daily use. The source of a page does not only exist to be rendered or debugged. The text of a newspaper does also not exist only for interpretation or editor redaction.
Firefox for android is used on mobile devices where the hardware and software debug requirements are most of the time not an option. When competing browsers and versions ack this situation even for desktop versions there is no valid reason to keep this out of firefox for android.
+1 . I needed to view source on a page while not at my laptop/desktop. I found my Firefox had updated and I couldn't seem to do it. I had to switch to chrome for android. I regularly promote Firefox to people (developers/power users and nontechnical people), but if I can't feel confident that they aren't going to need a 'backup' browser to do things, then I'm not going to be confident in suggesting and moving them to Firefox.
I personally am looking for my phone to become more powerful and be able to supplant my desktop/laptop usage (looking forward to one USB C cable to a KVM/monitor and my environment is running from my phone). Part of the reason I moved to Firefox on android is it was the only browser to support extensions on mobile. If the new position is that the mobile browser should be less featured (removing view-source:, and a number of ff for android extensions broke too) then that's really unfortunate because that seems to show ff intentions and power user wants are diverging; and if I had to wager I'd guess power users are the ones switching their friends, family, and colleagues over to Firefox (I know I am/was).
The URL https://addons.mozilla.org/en-US/android/addon/view-page-source-mobile brings me to a page in Nightly that does not allow me to install the add-on, but instead offers me a link to go elsewhere (see the screen shot below)
That link (https://support.mozilla.org/en-US/kb/find-and-install-add-ons-firefox-android) shows me how to add extensions from the kabob menu in Firefox (and the Add-ons Manager in Nightly). Using that method, this add-on is not available.
So, no, I cannot get that extension in Nightly. Even if I did, I want to view source in the release version of Firefox (reflecting what my users use).
So, no, I cannot get that extension in Nightly.
You can but you have to follow the instructions on https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly/.
You can but you have to follow the instructions on …
You cut the rest of my statement in your quote, so let me add it:
Even if I did, I want to view source in the release version of Firefox (reflecting what my users use).
I need this feature in the stock release of Firefox, not the Nightly.
You cut the rest of my statement
Nope. You said two different things and I only clarified the part that was wrong: _"I cannot get that extension in Nightly"_. That you want this feature in the stable release of Firefox has nothing to do with your previous statement that you can't install the add-on in Firefox Nightly. There was no reason for me to answer to that part.
That you want this feature in the stable release of Firefox has nothing to do with your previous statement that you can't install the add-on in Firefox Nightly. There was no reason for me to answer to that part.
Fair enough.
Which also clarifies that @andreicristianpetcu providing the link does not address the original request, leaving this still unresolved.
Yeah, it's not a permanent solution by any means.
This issue will still remain open till they implement it natively, as it rightfully should.
Meanwhile however, it's still a viable temporary alternative.
And since it talked more about the fact that you could install every other add-ons (the linked blog post), treat it more as a related remark instead of a permanent solution.
On a side note, I actually find the whole concept neat as a temporary solution, since now I can also install every other add-ons that I used to have in Fenec, and more (Stylus later versions weren't available in Fenec, but with the Collections trick you can get it to install on Fenix - although unfortunately, it's exactly the one add-on that ends up kinda bugged among all the add-ons I've tried on Fenix - if you're interested on the details, basically the styles are applying correctly, but you can't write new styles as the fancy editor won't load - you can however install/import already written styles).
Of course I'm not planning to have Nightly as my daily driver, but the fact that I can get most of the add-ons work, despite of the fact that they haven't been included in the built-in "recommended" set, is reassuring to say the least (they did mention a few of the APIs haven't been implemented in the linked blog post, but it's only matter of time).
As a work around, you can view source codes with an online service like this:
https://htmlstrip.com/html-source-code-viewer
@KrasnayaPloshchad This is useless for any pages that require authorization and/or display user-specific content.
You can get this with an extension in Nightly https://mobile.twitter.com/FirefoxPreview/status/1312841296793546753
https://addons.mozilla.org/en-US/android/addon/view-page-source-mobile
https://mobile.twitter.com/FirefoxPreview/status/1311796843848835072
i don't use nightly,i use stable.Is there a workaround for it?
no
I think it’s good to know View Page Source (Mobile) is works for this, but it would be nice if Mozilla claims the extension is supported on Firefox for Android.
Most helpful comment
Every major web browser on both desktop and mobile handles view-source, it's a basic web browsing feature. Sometimes viewing source is the only way to access content on certain web pages. Releasing Fenix without it is inexcusable, and it's also a big regression from Fennec, which even has a dedicated menu item for it.