Can Firefox's “view source” be set to not make a new GET request?

前端 未结 12 1469
你的背包
你的背包 2020-12-13 05:50

This is sort of tangential to coding, but programmers often do \"view source\" on their own pages and on others\' pages. I learned that when you do the normal View Source in

相关标签:
12条回答
  • 2020-12-13 06:30

    It is upsetting. An alternative to the methods above is to open the debugger using F12, then click the Network tab.

    When you browse to different pages, each GET/POST is shown. You can then click on which post you want, and click the Response tab to see the data that was received by the browser.

    0 讨论(0)
  • 2020-12-13 06:34

    You do a Ctrl+A, right click and "view selection source", that doesn't re-request the page.

    0 讨论(0)
  • 2020-12-13 06:37

    "View Generated Source" is not the same source code you get with "View Source".

    View Generated Source "improves" the code, parsing the html, adding newlines among tags, changing attributes order (width="100%" cellpadding="0" => cellpadding="0" width="100%"), adding attributes values (nowrap => nowrap="nowrap") and tags (tbody from nowhere), etc.

    You might think this is better, but if you want to compare the old generated source with the actual file, it's useless.

    Your best bet is search the directory cache.

    Regards

    0 讨论(0)
  • 2020-12-13 06:39

    This solution was ok in 2012, but no longer nowadays.

    Type "about:config" in the address bar. In the filter box, type : "browser.cache" "browser.cache.disk.enable" and "browser.cache.memory.enable" must be set to TRUE. Done ! All credit to @MatrixFrog

    0 讨论(0)
  • 2020-12-13 06:40

    This is broken in Firefox for some time now:

    https://bugzilla.mozilla.org/show_bug.cgi?id=307089

    They aren't very responsive on their bug tracker, but your options are:

    (1) complain at the bug tracker,
    (2) fix it yourself it's open source software,
    (3) find another browser.

    0 讨论(0)
  • 2020-12-13 06:50

    To extend @Techn4k's answer: If you have those two properties set, but still get the re-GET or re-POST behavior, clear your browser cache: Go to about:preferences#advanced, click on the network tab, and click clear now (or similar) on the cache information part.

    This lets Firefox fetch and cache the page, so that no re-GET or re-POST appears.

    0 讨论(0)
提交回复
热议问题