Open Bug 1632108 Opened 4 years ago Updated 2 years ago

Display page source from cache

Categories

(Core :: DOM: Core & HTML, enhancement)

75 Branch
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: joshas, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Open any webpage. Right click and select "View Page Source" from context menu or press Ctrl+U.

Actual results:

To display page source browser is doing new request and downloading new version of source from the server.

Expected results:

Back in old days browser just displayed same source it had already cached, so you are actually looking at exactly same source as it was loaded when original web page was loaded.
Viewing source code from cache is useful in many cases: it will be displayed instantly, it will have exactly the same code, including time stamps and various dynamically generated content, exactly the same as on original page, and if server went down or you lost internet connection - you'll still be able to view and save HTML source code.
One can use Inspector Tools to view source, but it is modified either by scripts or browser, so it is impossible to debug issues like unclosed HTML tags. Firefox source viewer also is helpful at pointing out possible mistakes.
I do not know exact reason why this functionality was changed, probably it was a very good reason. In that case at least provide an option (or flag in about:config) to revert to old "View source" functionality. First load page source from cache and only if user reloads source page - download new version from server.

Adding a component for this issue in order to get the dev team involved.
If you feel like it's not the correct one please feel free to assign it an appropriate one.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.