Bug 53680 - [4.4] [Firefox] UMC-Caching
[4.4] [Firefox] UMC-Caching
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-8-errata
Assigned To: UMC maintainers
UMC maintainers
:
Depends on: 37720
Blocks: 53465
  Show dependency treegraph
 
Reported: 2021-08-19 13:45 CEST by Florian Best
Modified: 2022-03-07 15:40 CET (History)
6 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, External feedback, Troubleshooting, Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2021-08-19 13:45:34 CEST
We must improve/fix the caching handling for Firefox. Chromium is now working.

(In reply to Felix Botner from Bug #37720 comment #16)
> ok cache seems to work with these changes
> but i am not sure about the update
> 
> with firefox (90.0) i am redirected to /univention/management after the
> maintenance mode, login screen is ok and login works, but then  i get an
> empty page, reload does not help, after 1h or so, reload works and i can see
> the UMC
> 
> dev tools:
> http://10.200.7.90/univention/js/umc/dialog/NotificationDropDownButton.js
> Status404
> Not Found
> 
> Die Ressource von
> "http://10.200.7.90/univention/js/umc/dialog/NotificationDropDownButton.js"
> wurde wegen eines MIME-Typ-Konfliktes ("text/html") blockiert
> (X-Content-Type-Options: nosniff).
> management
> Laden fehlgeschlagen für das <script> mit der Quelle
> "http://10.200.7.90/univention/js/umc/dialog/NotificationDropDownButton.js".
> management:1:1
> Error: scriptError: /univention/js/umc/dialog/NotificationDropDownButton.js
>     Dojo 23
>     callback (index):23
>     callback config.js:150
>     Dojo 2
>     callback config.js:146
>     Dojo 17
> 
> chromium works

+++ This bug was initially created as a clone of Bug #37720 +++

When we build e.g. the UMC-frontend package the files in the deb archive will have mtime=$(build-time).
When dpkg installs the package the mtime from these files are taken instead of the extraction time.
When apache serves the files now it uses the mtime value with the build time.

Especially internally it is strange behavior as we are often working with VM's with set time in the past. When the file-mtime is in the future apache takes the current system time as Last-Modified value. → This prevents firefox from invalidating its cache.

Maybe we should trigger a touch over all UMC-apache-files in the postinst of UMC.
We probably can remove the $js-hash$ then, too and let apache handle caching completely (I suspect apache to do it correctly, our caching-workarounds probably exists due to this described problem. Chromium+Firefox can handle Last-Modified, and in UCS 4.0 we are supporting only IE>=9 → that should also work).

curl -i http://$host/univention-management-console/login.html | grep -i -e Etag -e Last-Modified
date --set '2014-12-13 14:15:16+0200'