Issue 11641

Add version parameter to use cache-busting for sao files
Nosy list
acaubet, ced
Assigned to

Created on 2022-08-11.12:10:42 by acaubet, last changed 3 months ago by ced.


Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-08-11.13:45:24

What will be the "version"?

More over I see no benefit if it is just the sao js file having such versioning. The index.html will not be updated, nor any of the other javascript files.
Also HTTP has already support for search requirement with the Cache-Control and etag.

And finally this goes against the plan to remove grunt

Author: [hidden] (acaubet)
Date: 2022-08-11.12:47:03

on index.html:
<script type="text/javascript" src="dist/tryton-sao.min.js?v={{ VERSION }}"></script>
and with grunt-string-replace:
the files list would be the index.html and with the same pattern and replacement of the example.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2022-08-11.12:19:37

I remove the easy flag because for nothing is easy in this feature.
Could you elaborate on how this can be done?

Author: [hidden] (acaubet)
Date: 2022-08-11.12:12:48

FTR, I suggest to use grunt-string-replace.

Author: [hidden] (acaubet)
Date: 2022-08-11.12:10:39

It's a common technique to use cache-busting to able the user to have the most recently updated files without having to perform a hard refresh or clear their browser cache.
We could have it at least for:


I also propose to include on all bower_components as normally when you use a CDN source the version is included on the link, so if developer change version it change also for the user the url. But with our setup the link is always the same path (E.g. src="bower_components/jquery/dist/jquery.min.js")

Date User Action Args
2022-08-11 13:45:24cedsetmessages: + msg77669
2022-08-11 12:47:03acaubetsetmessages: + msg77665
2022-08-11 12:19:38cedsetkeyword: - easy
messages: + msg77663
nosy: + ced
status: chatting -> need-eg
2022-08-11 12:12:48acaubetsetmessages: + msg77662
2022-08-11 12:10:42acaubetcreate