Ajax.request using ExtJs
extjs, extjs4
Solution
Just FYI..
For the Who is adding parameter _dc. dc stands for disable cache. by default, every request in extjs will automatically append the request variable with _dc. more info
If you don't want it, just set `disableCaching: false` to your request
Ext.Ajax.request({
disableCaching: false,
url: 'http://localhost:8080/4910.json',
......
});
For the why not allowed. Try opening the JSON URL path without `_dc`, or maybe there is something wrong with your server.
Problem
I'm having difficulty loading JSON content from a file. `console.log` prints `"server-side failure with status code 0"`, meaning that the request failed. My JSON file URL is correct and the file is present at the given address. Firebug shows the error: ``` "NetworkError: 405 Not Allowed - http://localhost:8080/4910.json?_dc=1336714070619 ``` and the Net tag shows status `405 not allowed`. Any ideas on why this is happening? ``` Ext.Ajax.request({ url: 'http://localhost:8080/4910.json', success: function(response, opts) { var obj = Ext.decode(response.responseText); console.log(obj[0].name); }, failure: function(response, opts) { console.log('server-side failure with status code ' + response.status); } }); ``` Also, what is adding the parameter `_dc=1336714070619` to the end of the GET request?