Dean Radcliffe
Dean Radcliffe

Reputation: 2206

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:

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)

Upvotes: 3

Views: 1037

Answers (1)

Francis Gilbert
Francis Gilbert

Reputation: 3442

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 :).

Upvotes: 3

Related Questions