Hi,

When apache or tomcat serves static files, they add "Last-Modified" but no 
Expires nor Cache-Control.
In that cas browsers are using heuristics to know how long the file must be 
cached.
( 
http://stackoverflow.com/questions/14345898/what-heuristics-do-browsers-use-to-cache-resources-not-explicitly-set-to-be-cach
 )

Workaround for apache >= 2.4 : globally add the following on all apaches:

  Header setifempty Cache-Control "max-age=86400" "expr=-n resp('Last-Modified') && 
-z resp('Expires')"


Anyway, AFAIK best solution for CAS is to use themes and versionize theme name 
(cache busting).

cu

On 24/10/2016 23:00, Tom Poage wrote:
Don’t recall seeing cache-control in CAS itself (doesn’t mean it’s not there). 
We've been doing the following in httpd:

  <LocationMatch"\.(css|gif|jpg|png|js)$">
    <IfModulemod_expires.c>
      ExpiresActiveOn
      ExpiresByTypetext/css "access plus 1 hour"
      ExpiresByTypeimage/gif "access plus 1 hour"
      ExpiresByTypeimage/jpeg "access plus 1 hour"
      ExpiresByTypeimage/png "access plus 1 hour"
      ExpiresByTypetext/javascript "access plus 1 hour"
      ExpiresByTypeapplication/javascript "access plus 1 hour"
    </IfModule>
  </LocationMatch>


Tom.

On Oct 24, 2016, at 12:32 PM, Manfredo Hopp <[email protected] 
<mailto:[email protected]>> wrote:

Hi:

Trying to install a custom login page I noticed this strange behaviour with an 
apache front-end of cas 4.0.1.

Here is my Cas properties file:

src/main/resources/cas-theme-default.properties:

#standard.custom.css.file=/css/cas.css
standard.custom.css.file=/css/mydomain.css
cas.javascript.file=/js/cas.js

This new css is loaded only with a refresh of the browser.


Is there any issue regarding this behaviour?



Thanks!

Manfredo


--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
--- You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/eb9e838a-c6a4-019a-2526-bce49feb4527%40univ-paris1.fr.

Reply via email to