2

Is it possible to specify some files in Firefox to be remembered forever?

For example, a file like http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js will never change, for sure. But Firefox will lose a few milliseconds every time to make a request, then to receive a 304 response, when there is really no need to do it.

2 Answers 2

1

According to the Cacheability website report for that URL, the web server is sending good HTTP response headers:

Expires: Sat, 23 Jul 2011 03:04:49 GMT
Cache-Control: public, max-age=31536000

So your Firefox should not be checking it with every request.

3
  • Well, probably my explanation was incorrect and I'm sorry for that. The file is cached well, so it is not queried when I switch to another page. But if I refresh a current page, then it is reloaded with a 304 response. Since I'm a web developer, I sometimes refresh the page hundreds of times per hour to check CSS or HTML changes I made, thus requesting jQuery and other files each time. Jul 23, 2010 at 21:05
  • 1
    Hmmm -- so you are forcing a refresh of the page? As you found, that negates the cache control headers. I don't know of a way to make Firefox not to reload that particular file when you force refresh a page. Jul 24, 2010 at 22:07
  • you're probably right saying it is impossible. Searched on other websites, and it seems like a refresh does a refresh of everything, every directly linked file. Jul 25, 2010 at 12:27
0

For those who are searching to avoid refreshing files when debugging CSS on their own website, a possible solution would be to declare files in JavaScript during debug.

For example, instead of putting an image like <img src="link-to-a-file" alt="" />, put just <img id="ChangeMyId" alt="" />, then through JavaScript change the src property of the image.

Of course, it does not answer my question, since my question is not just about websites I can can change, but about any website.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .