Comments (2)
Ah, just answer my own question, you can move the { cache: false } parameter into the ajaxSetup() of your application.js. Might be nice to mention this briefly in your README.
This gives me the following ajaxSetup() function in my application.js:
$.ajaxSetup({ cache: false, beforeSend: function(xhr) { xhr.setRequestHeader("Accept", "text/javascript"); } });
Regards,
Declan
from jquery.rest.
Declan, thanks for your comments. I don't think this issue was related to my plugin, as I'm pretty certain you would have experienced the same issue with $.ajax, and the solution would have been the same.
You can attach a version number to resources as a query parameter to force a cache reset when it changes; I believe Rails does this for us, so we didn't experience this problem.
You are correct that changing this setting in ajaxSetup is the ideal place to do it.
If you have any other problems, feel free to let me know. I hope you find this plugin useful!
from jquery.rest.
Related Issues (8)
- PUT & POST Method mismatch ? HOT 4
- Support JSON contentType HOT 2
- $.update does not send right Accept header HOT 2
- Content-Type management HOT 1
- Use real PUT and DELETE requests for browsers that support them HOT 2
- Does not work with rails 3 jquery ujs driver
- Using jquery.rest with inherited_resources HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery.rest.