matomo-org/matomo

New FAQ: How do I force my website visitors browsers to download the recently updated piwik.js?

Open

#9.619 geöffnet am 22. Jan. 2016

Auf GitHub ansehen
 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)PHP (2.847 Forks)batch import
Help wantedc: Website matomo.org

Repository-Metriken

Stars
 (21.513 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T 11h) (106 gemergte PRs in 30 T)

Beschreibung

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. https://github.com/piwik/piwik/issues/9607#issuecomment-173673850

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

Contributor Guide