Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome doesn't cache images/js/css

When Chrome loads my website, it checks the server for updated versions of files before it shows them. (Images/Javascript/CSS) It gets a 304 from the server because I never edit external javascript, css or images.

What I want it to do, is display the images without even checking the server.

Here are the headers:

Connection:keep-alive     Date:Tue, 03 Aug 2010 21:39:32 GMT     ETag:"2792c73-b1-48cd0909d96ed"     Expires:Thu, 02 Sep 2010 21:39:32 GMT     Server:Apache/Nginx/Varnish 

How do I make it not check the server?

like image 565
Roger Avatar asked Aug 03 '10 21:08

Roger


People also ask

Do CSS files get cached?

Unless you've messed with your server, yes it's cached. All the browsers are supposed to handle it the same. Some people (like me) might have their browsers configured so that it doesn't cache any files though. Closing the browser doesn't invalidate the file in the cache.

Does Google Chrome cache images?

Like other web browsers, Google Chrome features a cache that stores files such as images, scripts and video content from websites that you visit over time.

How do I force the browser to reload cached CSS and JavaScript files?

It works, all the time, for everyone. But, if you're not using it, and you just need to reload that one CSS or JS file occasionally in your own browser... just open it in its own tab and hit SHIFT-reload (or CTRL-F5)!

Are .JS files cached in browser?

JavaScript and CSS files are usually cached in the browser after the first access. The browser cache is used to store web application assets like images, CSS, and JS code on your computer's hard drive.


1 Answers

Make sure you have the disable cache checkbox unchecked/disabled in the Developer Tools.

like image 126
Sabrina Leggett Avatar answered Oct 26 '22 23:10

Sabrina Leggett