I have a page in which some pieces and "header" pieces I have this tag & lt; Webuijsf is: script id = "script_logo" url = "/ resources / logo.js" />
. This is in HTML & lt; Script src = "/ app / resources / logo.js" type = "text / javascript" id = "header: script_ logo" & gt; & Lt; / Script & gt;
. It's okay and it is working as expected. Now I need to return the URL to Javascript with Javascript in the current version of the app anyway. This is known as the technique to force the resource's reload (javascript, CSS and images), if they are redeemed in favor of the client, I would like to see the & lt; Script src = "/ app / resources / logo.js? Ver = 1.0.405" type = "text / javascript" id = "header: script_ logo" & gt; & Lt; / Script & gt;
. Please note the ver
parameter in the URL. Thank you
Tomas
OK, you can add it only to the page:
< Pre> & lt; Script src = "/ app / resources / logo.js? Ver = # {commonBean.version}". .. & gt;
I assume that you have to configure the version and be sent by the server, so normal bean
is a JSF bean that gives the correct version.
Update: See also a look (from Richfesses)
The last option is to create your own components and automatically add the version. See tutorial for how to make it, JSF 1.2
Comments
Post a Comment