Using Ext, default Ext.Ajax add to GET-request _dc
parameter. For example
GET /ConnViewProcessing/?_dc=1263286227619
How to remove this parameter?
PS: it's necessary to manually cache response to ETag
and If-None-Match
.
Set disableCaching
option to false:
Ext.Ajax.disableCaching = false;
Using Ext JS 4.1, and after adding the following code to app.js
, the _dc
parameter disappears:
// Disable _dc parameter
Ext.Loader.setConfig({
disableCaching: false
});
// My App
Ext.application({
The proper way to accomplish that with Sencha Cmd 6.x is to set a (global) switch in app.json
(because all of those hacks and overrides might interfere unnecessarily with the functionality):
"loader": {
"cache": true
},
Then run sencha app refresh
, in order to update the application's bootstrap.json
.
Alternatively, one can configure Ext.Loader
(at run-time):
Ext.Loader.setConfig({disableCaching: false});
When scrolling upwards and reading the actual question, concerning Ext.Ajax
(per request):
Ext.Ajax.request({url: '/ConnViewProcessing', disableCaching: false});
The result: no more _dc parameters on scripted requests.
@see Sencha Cmd 6.x - The Microloader.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With