You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to request a feature if you have interest on implementing it.
What I'd really like is a plugin that would allow jQuery to automatically cache my responses when Last-Modified or ETag headers are set in the response.
When you set the ifModified option to true in the $.ajax options, jQuery will fill in the if-modified-since header for instance. But the main problem is that it won't cache the result of a request with a Last-Modified header present. That means the next time you make the ajax call, data will be undefined if the server responds with 304 (Not Modified).
If your plugin could automatically detect when Last-Modified or ETag is sent by the server and cache the result so that it is used in 304 responses transparently, then the caching would work seamlessly with no code changes in the sense that the ajax handlers will get the cached data in the arguments instead of undefined.
In the seamless mode, no cache is performed by the plugin unless Last-Modified or ETag is present in the header.
What do you think? Does it make sense?
The text was updated successfully, but these errors were encountered:
I'd like to request a feature if you have interest on implementing it.
What I'd really like is a plugin that would allow jQuery to automatically cache my responses when Last-Modified or ETag headers are set in the response.
When you set the ifModified option to true in the $.ajax options, jQuery will fill in the if-modified-since header for instance. But the main problem is that it won't cache the result of a request with a Last-Modified header present. That means the next time you make the ajax call, data will be undefined if the server responds with 304 (Not Modified).
If your plugin could automatically detect when Last-Modified or ETag is sent by the server and cache the result so that it is used in 304 responses transparently, then the caching would work seamlessly with no code changes in the sense that the ajax handlers will get the cached data in the arguments instead of undefined.
In the seamless mode, no cache is performed by the plugin unless Last-Modified or ETag is present in the header.
What do you think? Does it make sense?
The text was updated successfully, but these errors were encountered: