Hybrid View

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-11994 in 4.2.3.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    7
    Vote Rating
    0
    rferri is on a distinguished road

      0  

    Default Ext.Loader.loadScript w/ disableCaching - Multiple Query Strings

    Ext version tested:
    • Ext 4.2.1
    Browser versions tested against:
    • n/a
    DOCTYPE tested against:
    • n/a
    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

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    8,561
    Vote Rating
    228
    Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of

      0  

    Default

    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!

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    7
    Vote Rating
    0
    rferri is on a distinguished road

      0  

    Default

    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

    script.js?key=value?_dc=1389667417378

    instead of the expected

    script.js?key=value&_dc=1389667417378

  4. #4
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    8,561
    Vote Rating
    228
    Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of

      0  

    Default

    I see what you're saying now -- apologies for missing that. Thanks for the report! I have opened a bug in our bug tracker.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    7
    Vote Rating
    0
    rferri is on a distinguished road

      0  

    Default

    No worries, thanks!

Thread Participants: 1