zonemaster-gui icon indicating copy to clipboard operation
zonemaster-gui copied to clipboard

ZM is caching

Open Ressy66 opened this issue 2 years ago • 5 comments

There are two issues here, and both related, so I will make mention here as they may be related causes.

In previous releases if we edit assets/i18n/en.json , a few refreshes and forced cache expire of browser later, would pick it up.

In the current release this does not happen, no matter what it never changes, this seems to be in the newer files in dists root i18n-en-json-es201~6606590a7f2fb8.js etc modifying one word in there, eventually is picked up by browsers, these did not exist previously when things worked for customising texts.

Why is there i18n-en-json-es5. version of everything, all this seems unneccessary and adds a lot of complexity finding errors, espeically for those of us who are not json fans/experts/etc.

Please simplify this, and allow somewhere for us to once again over ride your choices, frankly at moment those assets/i18n files may as well not be there, since they are ignored.

As touched on, the other related issue of caching where changes made not picked up, adding a msgbanner and removing it takes forever for some browsers to refresh it (they shouldnt have to force cache flush or force reset), the same applies here for logo, Chrome picks it up right away, firefox, opera and edge, don't unless a lot of forced cache resetrs, except edge, which doesnt change at all.

Ressy66 avatar Jul 17 '22 08:07 Ressy66

I will add this is d/l the release package available from git - NOT the source file where we have to build it.

Ressy66 avatar Jul 17 '22 08:07 Ressy66

Have you tried to update the source code and then build a new GUI package instead?

matsduf avatar Jul 18 '22 10:07 matsduf

In the current release this does not happen, no matter what it never changes, this seems to be in the newer files in dists root i18n-en-json-es201~6606590a7f2fb8.js etc modifying one word in there, eventually is picked up by browsers, these did not exist previously when things worked for customising texts.

Why is there i18n-en-json-es5. version of everything, all this seems unneccessary and adds a lot of complexity finding errors, espeically for those of us who are not json fans/experts/etc.

The new files names are to avoid having the old translations getting cached, these are autogenerated in our build process. I'll have a look to see if it can be done in a more human readable manner.

As touched on, the other related issue of caching where changes made not picked up, adding a msgbanner and removing it takes forever for some browsers to refresh it (they shouldnt have to force cache flush or force reset), the same applies here for logo, Chrome picks it up right away, firefox, opera and edge, don't unless a lot of forced cache resetrs, except edge, which doesnt change at all.

Maybe this would be best done at the web server level (Apache or Nginx) by setting the Cache-Control header. I don't have a example to share at the moment, when I do I will share it. If that works we could update the example Apache configuration to have it included.

hannaeko avatar Jul 18 '22 11:07 hannaeko

We are in the process of changing how we handle translation as the previous system has became partially unmaintained. In the new system (not yet merged in develop), the translation is handled at compile time making it not possible to change some strings just from the release package.

May I ask what were your changes? Did you add a language or did you change some wording? Either way if the changes are relevant to be included in upstream that could be something we could consider doing.

hannaeko avatar Nov 14 '22 16:11 hannaeko

@Ressy66, is this still an issue for you?

matsduf avatar Sep 08 '23 12:09 matsduf