Univention Bugzilla – Bug 44009
Get jpegPhoto in a way that it is possible to cache it (in grid tile view)
Last modified: 2021-11-12 14:28:32 CET
Get jpegPhoto in a way that it is possible to cache it (in grid tile view) For more infos: bug 42229, comment 6
BTW, this might be a problem when changing the users profile picture and it does not change due to the old cache being still used. We could add the last modification timestamp of the user object to the GET request?!
This is already suggested in the original comment: Suggestion (patch attachment 8553 [details]): 1. Don't query the image via xhr but via a regular GET request. 2. Create a Apache rewrite rule for …/udm/users/user/($etag/)?$dn/userphoto to /udm/image?flavor=...&dn=... → This allows the browser to cache the image 3. Set explicit cache control and expiration HTTP headers to make sure the images are cached for a long time, we could even set Last-Modified from the "modifyTimestamp" LDAP attribute. Generating some E-Tag would also be nice. Maybe we could even add some versioning to the URL, too, by adding the E-Tag into the URL: …/udm/users/user/$dn/$etag/image. Then the cache would immediately be invalidated when the image changes.
Created attachment 9931 [details] draft patch Didn't get this finished, still a lot of improvements needs to be done.