How do javascript frameworks treat 304 not-modified?
I'm curious how this works in Jquery, but also in general. When a JS resource is fetched, and the server indicates a 304 not-modified, does a framework:
- Load the JS开发者_JAVA百科 file from cache and execute it
- Not execute it
I'm trying to support a polling solution, and if I can get Jquery to do nothing upon recieving a 304 my work is done, otherwise, I have to write the resource in a safely-reloadable (idempotent) way, which is harder (imagine adding a status div to the page, where you wouldn't want to do that again if the status hasn't changed)
It'll load the js file from cache and execute, either way, it will execute each time. Sorry, it's the harder way you'll need :).
精彩评论