Ext JS Community Forums 4.x /
Ext.Loader.loadScript w/ disableCaching - Multiple Query Strings
Ext version tested: Browser versions tested against: DOCTYPE tested against: Description: Using Ext.Loader.loadScript to dynamically load a script with a URL that contains a query string results in a request for a file with multiple query strings when the disableCaching config is true.
The implementation of loadScript should use Ext.String.urlAppend to append the cache-buster key-value pair to the URL.
https://fiddle.sencha.com/#fiddle/2kn Steps to reproduce the problem: Set the Ext.Loader config disableCaching to true
Call Ext.Loader.loadScript, passing a URL that contains a query string.
The result that was expected: The URL requested should contain one query string with the additional cache-buster key-value pair appended.
The result that occurs instead: The URL requested contains two query strings: the original and a query string that contains only the cache-buster kvp
I think this is because you are calling the loader twice. If I comment lines 28-30 from your Fiddle example, it behaves as expected.
Join me at SenchaCon 2016!
I called it twice to illustrate the difference between calling loadScript when disableCaching is true and when it is false. Commenting lines 28-30 has no impact on the loadScript call initiated on line 38 (nor would I expect it to).
You should see that the URL passed to injectScriptElement remains
instead of the expected
I see what you're saying now -- apologies for missing that. Thanks for the report! I have opened a bug in our bug tracker.