0

Is it possible to tell Chrome to cache everything except one file (is there some kind of extension for it)?

It could be useful during development if I'm changing only one js file and I don't want to re-download entire app, I just want this new JS.

Slaven Tomac
  • 1,552
  • 2
  • 26
  • 38
  • 3
    Why not use _proper_ mechanisms by making the server pass no-cache directives for that file? – Xan Mar 17 '15 at 11:08
  • It could be an idea, but I'm currently working on frontend part only and I really don't know how to set up my server to do that. – Slaven Tomac Mar 17 '15 at 11:09
  • 1
    I don't have time to write an answer right now, but I think [`webRequest` API](https://developer.chrome.com/extensions/webRequest) can be used quite easily to insert / override response headers that regulate caching. – Xan Mar 17 '15 at 11:10
  • Thanks, I'll try it out! I'll post here with my findings – Slaven Tomac Mar 17 '15 at 11:22
  • 1
    @Xan Caching behavior cannot be controlled through the webRequest API, see http://stackoverflow.com/a/17382259 and https://crbug.com/355232. – Rob W Mar 17 '15 at 11:28
  • 1
    @SlavenTomac See my previous comment before you waste time on chasing a dead end. – Rob W Mar 17 '15 at 11:28
  • Ok guys, thank you all for your comments here...I guess I'll have to jump on server and try to add no-cache to this file... – Slaven Tomac Mar 17 '15 at 11:32
  • You simply modify the js right on the chrome debugger. No need to reload the app. – Zig Mandel Mar 17 '15 at 13:10

1 Answers1

0

The chrome debugger lets you change a js file on the fly. Just change the code and save it within the chrome debugger so you can test the new code without reloading the app or page.

Zig Mandel
  • 19,571
  • 5
  • 26
  • 36