New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New FAQ: How do I force my website visitors browsers to download the recently updated piwik.js? #9619
Comments
I think all we can do here is to write an FAQ (if none exists yet) on how to achieve this. It otherwise depends on proper server configuration and integration into the website. We cannot really do much here. However, what we can maybe do would be to add an option to the TrackingCodeGenerator API to add Piwik version string as URL parameter automatically. This way users can still include it in their website by calling the API and benefit of proper versioning 👍 |
If someone wants to work on this ping me and I can give some help on which files need to be edited |
hmm.. as you know I'm no programmer... |
It might be possible but not really fast etc. For best performance you don't really want to have a file that is always loaded. Especially when it comes to tracking as it may take a bit longer to load even if the file is very small and then it might miss to track a user when the user is leaving the page quickly. |
Thanks for suggestion. By design we can't easily force clients to re-download our piwik.js. If a Piwik user wanted to do this, the best way would be to configure the webserver to set the appropriate cache headers. I'd recommend to check online for articles that explain this, rather than create a FAQ on our website. |
Maybe we could at least have an FAQ that basically says "Google for how to do this" as for sure many users have this question. This is relevant for pretty much every application and enterprise website. |
@tsteur we could have such FAQ |
Did anything happen? |
There is a simple solution in the forum (the file cache duration is forced by JavaScript to 1 day): |
Sorry, this is not what I consider decent caching policy.
Since the tag manager already works with versions, I assume that enabling to append of a version string not to be rocket science. |
Since sometimes changes in piwik's js is nessary (fixes and optimizations)
one should made it possible to bring these changes to every visitor especially also to returning visitors as soon as possible (asap = instantly on availibility).
At this time caching of visitor's browser slows usage of new version down
e.g. #9607 (comment)
The problem is that this file is often chached by the browser and reused for some time.
One solution can be an intelligent versioning of this file / the file hirachie construct around.
Everytime there is a change, a recognizable new version is provided and with this loaded and used by the browser.
Some general thoughts about this can be found here
https://stackoverflow.com/questions/8224736/javascript-versioning-to-avoid-caching-difference-in-these-practices
The text was updated successfully, but these errors were encountered: