Hi,

Sometimes is useful to pass a random argument to a CSS file, matters of
cache, when you change something in your style and wants the user to have
the site updated without the need to clean the cache
What I need is that CSS file will called as .../blablabla.css?version=12345
(ther argument does not matter, but browser will not use cached version)

I tried in layout.html:

<code>
{{response.files.append(URL(request.application,'static/css','home.css?version=12345'))}}
{{response.files.append(URL(request.application,'static/css','home.css',args='12345'))}}
</code>

and

<code>
import random
{{response.files.append(URL(request.application,'static/css','home.css',args=[random.random()]))}}
{{response.files.append(URL(request.application,'static/css','home.css',args=str(random.random())))}}
</code>

But web2py does not loads CSS in this way.

Reply via email to