Open Bug 1865818 Opened 2 years ago Updated 1 year ago

css files not shown in network when reloading

Categories

(DevTools :: Netmonitor, defect, P3)

Firefox 119
defect

Tracking

(Not tracked)

People

(Reporter: david.balazic, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0

Steps to reproduce:

  • open a new private browsing window

  • open devtools (F12)

  • switch to the Network tab

  • paste into URL bar: https://www.iana.org/help/example-domains

  • press enter to load the page

  • note that a CSS file (iana_website.css) is listed

  • clear the network log (trashcan icon)

  • reload (by pressing enter in the URL text input or by F5)

  • note that now the CSS file is not listed as loaded

Expected results:

the CSS file should be listed (as "cached", like the JS files are).

Tested with fresh profile.

Component: Untriaged → Netmonitor
Product: Firefox → DevTools

Thanks for you report, we can reproduce even in non-private windows, as far back as in ESR 115
Looks like we need some specific machinery to list cached stylesheets, as we do for images.

Severity: -- → S3
Priority: -- → P3
Status: UNCONFIRMED → NEW
Ever confirmed: true

For images, we register an observer service notification listener to handle cached request:
https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/devtools/server/actors/resources/network-events-content.js#55-58

May be we need something similar for stylesheets based on one of these notifications:
https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/layout/style/Loader.cpp#1580

The stylesheet does appear in the network log if the page is force-reloaded/shift-reloaded.

Bug 1851349 might be related.

You need to log in before you can comment on or make changes to this bug.