publishing assets appends an extra GET variable

Hi

I am experiencing a problem with published assets. There seems to be a GET variable that gets appended to the url of published assets, forcing the asset not to be loaded from the browser cache. I experience this while using PageSpeed with Firefox 5.0.

Here is the output from PageSpeed:




The following resources have identical contents, but are served from different URLs. Serve these resources 

from a consistent URL to save 1 request(s) and 89.2KiB.


    [..myurl..]/assets/a6345a53/jquery.min.js

    [..myurl..]/assets/a6345a53/jquery.min.js?_=1311546764082


The following resources have identical contents, but are served from different URLs. Serve these resources 

from a consistent URL to save 1 request(s) and 13.0KiB.


    [..myurl..]/assets/a6345a53/jquery.yiiactiveform.js

    [..myurl..]/assets/a6345a53/jquery.yiiactiveform.js?_=1311546768351




Any ideas on how this can be overcome will be appreciated.

can you post your code?

Controller - > SiteController

Layout -> site

Views -> index

  ->signup_form, verify->form

The index view renders partially the signup_form and the verify_form, depending on

which link is clicked. both signup_form and verify_form each contain CActiveForm forms.

Now since CActiveForm requires jquery.js and

yii.activeform.js, id imagine that when browser caching is enabled, both js files will only need to be downloaded once the first time and cached.

now the issue is, clicking on the links each makes a request that downloads jquery and

yii.activeform js files, and because the url request for the js resources gets appended the GET variable,

the js files get downloaded anew.

This is causing a major performance impact.

would welcome and help or recommendation.

cheers

i looked through the code and cant find anything that would append that timestamp… are you using any extensions??? are you using clientScript’s scriptMap???

Im not using any extensions or scriptmap. im beginning to suspect that the timestamp has to do with

the processoutput argument in renderpartial().

This solved my problem:


Yii::app()->clientscript->scriptMap['*.js'] = false;



Found it here