This case is an obvious example. 
I was only "suggesting" a better way to handle this kind of problem from a 
general POV. 
Both methods work ok, but if you set cache headers "far in the future" 
(e.g. handling static files with a webserver like apache or nginx) there is 
a caveat using the "vars" method: referenced resources in your css have the 
same url, so they are not fetched back with the css.
With versioned folders, instead, relative references works ok, so if the 
css is /static/1.2.3/css/main.css and has background: 
url(../img/someimage.png) the image is fetched at 
/static/1.2.3/img/someimage.png.

On Thursday, August 30, 2012 8:50:26 PM UTC+2, rochacbruno wrote:
>
>
> I cant understand how versioned folders would help on this case? I ran on 
> to this issue a long time ago and I ended using pure html for this.
>
> <script src="{{=URL('static', 'js', 
> args='mylib.js')}}?{{=get_random_number()}}">
>
> This works for me when I need to bypass the cache to get the proper js 
> loaded on the client.
>

-- 



Reply via email to