-
17 Dec 2012 1:18 PM #1
Unanswered: Ext.Ajax.request POST request cache-buster
Unanswered: Ext.Ajax.request POST request cache-buster
Is it possible to makek an ajax request with method POST and have it apply the querystring _dc= to make it random so the calls won't be cached? If I make the call using Ext.Ajax.request it does not work with POST, by default it does work for a GET. Also, if the call is made through the proxy of a store, it adds the querystring _dc= to prevent caching.
-
19 Dec 2012 7:22 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
That for me is having the _dc in the query stringCode:Ext.Ajax.request({ method : 'POST', url : 'somewhere/over/the/rainbow' });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Dec 2012 8:34 AM #3
When I run that code I don't get the _dc cache buster on the querystring, do the other properties I set cause it to function differently from your code?Code:Ext.Ajax.request({ headers: { 'Content-Type': 'application/json; charset=utf-8' }, method: 'POST', params: Ext.JSON.encode({ userId: getCookie('id') }), url: 'services/System.svc/MyMethodCall', scope: this, success: function (response) { //blah }, failure: function () { //blah } });
-
19 Dec 2012 8:47 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
19 Dec 2012 9:43 AM #5


Reply With Quote