Closed chahuistle closed 5 years ago
Status update: we managed to pinpoint the origin of this issue. It is related to caching. Since each generated offer is stored in a file with the same name, the browser thinks that the contents are the same, thus, it grabs a cached copy of the file.
As soon as you clear the cache in your browser, you will be able to get the most recent offer.
We found that this problem only occurs when using Firefox (60.5). Although we disabled caching in the code with fileResource.setCachTime(1000)
Firefox is still caching the old offers.
A possible solution could be to use a custom filter in order to disable caching (changing headers) but this would affect all requests and still it's not guaranteed that Firefox stops caching.
Another alternative would be to make the filename of the generated offer unique, e.g. 2019_Mustermann_QXXXX_<timestamp>.docx
, so to force the browser to download the new file. But since the desired filename is 2019_Mustermann_QXXXX.docx
this has to be manually change by the user. Therefore, we finally decided that the best compromise would be to disable caching in the browser manually. This can be achieved by browsing about:config
and setting browser.cache.disk.enable
to false.
If changes are done in the package list displayed while generating offers (in the "Offer Manager" tab), the generated offer (i.e., the file that is downloaded) does not contain any of these changes, even after the "Validate" button has been clicked.
I would strongly suggest to first replicate this issue before trying to do any changes to the code.