Opened 8 years ago

Closed 8 years ago

#13099 closed defect (fixed)

[CLA][PATCH] cacheBust does not work after AMD refactor

Reported by: liucougar Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: Core Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

here is a patch to bring it back:

  • dojo.js

     
    902902       if(has("dojo-sync-loader") || has("dojo-gettext-api")){
    903903               var getText = req.getText = req.getText || function(url, async, onLoad){
    904904                       var xhr = getXhr();
     905                       if(req.rawConfig.cacheBust){
     906                               //Make sure we have a string before string methods are used on uri
     907                               url += "";
     908                               url += (url.indexOf("?") == -1 ? "?" : "&") + String(req.rawConfig.cacheBust).replace(/\W+/g,"");
     909                       }
    905910                       if(async){
    906911                               xhr.open('GET', url, true);
    907912                               xhr.onreadystatechange = function(){

it would be better if the 'replace(/\W+/g,"")' part only run once and it's set to replace the original cacheBust (so no need to do the replace every time getText is called). but I don't know how to do that properly

Change History (1)

comment:1 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

(In [25280]) r/r requirejs config variable urlArgs with dojo config variable cacheBust; fully implement; thanks liucougar; fixes #13099; !strict

Note: See TracTickets for help on using tickets.