Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to disable the cache on Google Chrome for certain aspects only, in such a way that images for instance remain cached but markup/js/css don't?

I'm working on a rather graphic intensive app, and the images when not cached add a good half a second to the loading time of the page, which is a pain if you need to constantly refresh to test code changes and unnecesary if these images don't change as often as the html/js/css does.

share|improve this question

in your webservers .htaccess put

 <FilesMatch "(?i)^.*\.(js|css)$">
    ExpiresActive On
    ExpiresDefault 0

This should ensure that JS and CSS files are not cached by your browser.

Then you should use mod_pagespeed ExtendCache on the web server too, feature. It will allow your images to be sent with the right header information.

Once this is done on your development server (or whatever it is) the CSS/JS files should re-download on each page load but images will only be re-downloaded if forced. Also, make sure your local cache size is nice and big in Chrome's Preferences (you can also simply turn the images off here which is what I'd do)

share|improve this answer
This could work, but I was hoping I could find a solution that doesn't involve changing the server configuration for the sake of making it easy switching back and forth between cached/partially cached/uncached, much like one can enable or disable the cache on the chrome dev tools. – Mahn Mar 17 '13 at 2:08

You must log in to answer this question.

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