Ctrl-Shift-R not reloading css on localhost

RESOLVED INCOMPLETE

Status

()

Core
Networking: Cache
RESOLVED INCOMPLETE
a year ago
a year ago

People

(Reporter: nospam, Unassigned)

Tracking

45 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20161213204132

Steps to reproduce:

Update a CSS file for a website that's running locally (http://localhost/). Refresh or even repeatedly hard-refresh (shift-R) the page.


Actual results:

Nothing! Firefox has cached the CSS file and won't check if it has been updated. That's an excellent feature for live website but it would be nice if Firefox could be a little bit aggressive when it's loading local pages (typically used to develop websites).


Expected results:

The CSS file should not have been cached _or_ should have been loaded again after Shift-R. Maybe there could be an option to disable caching on certain domain. At the moment my only option is to disable caching completely, which is annoying - I do like the caching feature for pages on the interwebs.
(Reporter)

Updated

a year ago
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Ctrl+Shift+R should reload CSS.

Can you provide a minimal testcase, and the HTTP response header for the CSS file?
does the issue happen with safe mode? (there might be some case that extension is causing cache issue)

also, you could check how the request is handled in Network Monitor
  https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor
Flags: needinfo?(nospam)
(Reporter)

Comment 2

a year ago
I know, and I never had any issue with this; Ctrl-Shift-R has always done the trick.

To test this I edited the file large.css. It's showing as:
200  GET  large.css  localhost  css  cached  1.50KB

And here are the response headers for the file before and after the change (having the page refreshed ten times):

Accept-Ranges: bytes
Content-Encoding: gzip
Content-Length: 588
Content-Type: text/css
Date: Wed, 25 Jan 2017 21:22:39 GMT
Etag: "5ff-546f185171c42-gzip"
Last-Modified: Wed, 25 Jan 2017 21:00:17 GMT
Server: Apache/2.4.25 (Debian)
Vary: Accept-Encoding

Accept-Ranges: bytes
Content-Encoding: gzip
Content-Length: 588
Content-Type: text/css
Date: Wed, 25 Jan 2017 21:22:39 GMT
Etag: "5ff-546f185171c42-gzip"
Last-Modified: Wed, 25 Jan 2017 21:00:17 GMT
Server: Apache/2.4.25 (Debian)
Vary: Accept-Encoding
(Reporter)

Comment 3

a year ago
I have found a solution. While poking around in the settings for the Inspector I found the option "Disable Cache (when toolbox is open)". Ticking the box works:

Accept-Ranges: bytes
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 599
Content-Type: text/css
Date: Wed, 25 Jan 2017 21:55:13 GMT
Etag: "61b-546f22dcbcf06-gzip"
Keep-Alive: timeout=5, max=96
Last-Modified: Wed, 25 Jan 2017 21:47:27 GMT
Server: Apache/2.4.25 (Debian)
Vary: Accept-Encoding
(Reporter)

Comment 4

a year ago
You asked to check whether or not files are reloaded in safe mode. They aren't...

Response headers in safe mode, before changing the CSS file:
Accept-Ranges: bytes
Content-Encoding: gzip
Content-Length: 2078
Content-Type: text/css
Date: Thu, 26 Jan 2017 12:42:13 GMT
Etag: "1aaf-546f4886d1c4f-gzip"
Last-Modified: Thu, 26 Jan 2017 00:35:58 GMT
Server: Apache/2.4.25 (Debian)
Vary: Accept-Encoding

Response headers in safe mode, after changing the CSS file and a couple of Ctrl-Shift-Rs:
Accept-Ranges: bytes
Content-Encoding: gzip
Content-Length: 2078
Content-Type: text/css
Date: Thu, 26 Jan 2017 12:42:13 GMT
Etag: "1aaf-546f4886d1c4f-gzip"
Last-Modified: Thu, 26 Jan 2017 00:35:58 GMT
Server: Apache/2.4.25 (Debian)
Vary: Accept-Encoding

Response headers in safe mode, after setting "Disable Cache (when toolbox is open)" and a normal page refresh:
Accept-Ranges: bytes
Connection: Keep-Alive
Content-Encoding: gzip
Content-Length: 2087
Content-Type: text/css
Date: Thu, 26 Jan 2017 13:09:17 GMT
Etag: "1ac3-546ff0b9ed942-gzip"
Keep-Alive: timeout=5, max=98
Last-Modified: Thu, 26 Jan 2017 13:08:29 GMT
Server: Apache/2.4.25 (Debian)
Vary: Accept-Encoding

Updated

a year ago
Component: Untriaged → Networking: Cache
Product: Firefox → Core
Summary: Aggressive caching on localhost → Ctrl-Shift-R not reloading css on localhost
@nospam

I am unable to reproduce this. Do you think you could tell us more about your setup?
- what HTTP server are you using? apache/nginx/other?
- could you provide a minimal testcase? html + css file in an archive?
- are you able to gather some logs?
https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging

Thanks!
(In reply to Valentin Gosu [:valentin] from comment #5)
> - what HTTP server are you using? apache/nginx/other?
I just noticed it's Apache :)
No reaction for a month.  Please feel free to reopen when the required information is provided.
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → INCOMPLETE
Flags: needinfo?(nospam)
You need to log in before you can comment on or make changes to this bug.