-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable caching in htaccess #3
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, great work. There are a few concerns here and there (as aggressive caching can be -- shall we say -- annoying), other than that, I think it looks good 🙂
Header set Cache-Control "max-age=2678400, public" | ||
</filesmatch> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the above comment regarding image caching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, please correct if I am wrong, but for files with endings *.ico/*.jpg/...
we set a header control instruction with max-age of 1 month (60s * 60m * 24h * 31d = 2678400s). Is that not the same caching time span as in mod_expires above?
Co-authored-by: Pablo Klaschka <[email protected]>
Co-authored-by: Pablo Klaschka <[email protected]>
ExpiresByType application/x-shockwave-flash "access 1 month" | ||
ExpiresByType image/x-icon "access 1 year" | ||
ExpiresDefault "access 1 month" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this will, by default, affect HTML caching. I'll have to check that later...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It affects the expiration time for all documents if not specified by ExpiresByType
(see Apache Module mod_expires#ExpiresDefault)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, we have to check how this affects the dynanic content in different browsers. If a browser caches the movie index page for a month without revalidatung it, that wouldn't be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the previous comments 😜
No description provided.