[ 
https://issues.apache.org/jira/browse/WW-5773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-5773:
------------------------------
    Fix Version/s: 7.5.0

> Version the static JavaScript URLs emitted by tag templates
> -----------------------------------------------------------
>
>                 Key: WW-5773
>                 URL: https://issues.apache.org/jira/browse/WW-5773
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Tags
>            Reporter: Lukasz Lenart
>            Priority: Major
>             Fix For: 7.5.0
>
>
> h2. Problem
> Tag templates load their helper scripts from an unversioned URL, for example 
> {{${base}${staticContentPath}/optiontransferselect.js}}. Browsers cache 
> static content served by Struts for one day, and applications that set 
> {{struts.serve.static=false}} or a custom {{struts.ui.staticContentPath}} 
> serve their own copy.
> When a release changes both a template and the script it depends on, a 
> browser holding the cached old script, or an application serving an outdated 
> copy, runs the new markup against the old JavaScript. Nothing reports an 
> error; the widget just stops working. WW-5772 is the first change where this 
> shows: the transfer-select and updownselect buttons no longer carry an 
> {{onclick}} and depend on a listener registered by the new 
> {{optiontransferselect.js}} / {{inputtransferselect.js}}.
> h2. Proposal
> Append a cache-busting query parameter, such as the Struts version, to the 
> static script (and stylesheet) URLs emitted by the templates, so an upgrade 
> always fetches the matching file. Applications that serve their own copy 
> still need to update it, but browser caching no longer masks a correct 
> upgrade.
> Related: WW-5772



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to