-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzzz-expires-cdn.conf
More file actions
35 lines (29 loc) · 1.21 KB
/
zzz-expires-cdn.conf
File metadata and controls
35 lines (29 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## -----------------------------------------------------
## Apache 2.4
## User expires configuration file when using a CDN
## !!! Do not load in reverse proxy case !!!
## !!! Do not load zzz-expires.conf !!!
## !!! Do not load zzz-expires-fingerprint.conf !!!
##
## @context server config
## @module expires_module
## @author Olivier Jullien <https://github.com/ojullien>
## -----------------------------------------------------
# A modern default for caching is to actually do no caching at all, and use CDNs to bring your content close to your users.
# Every time a user loads your site, they'll go to the network to see whether it's up-to-date.
# This request will have low latency, as it'll be provided by a CDN geographically close to each end user.
# Cache-Control: no-cache for resources that should be revalidated with the server before every use.
# Cache-Control: no-store for resources that should never be cached.
# Cache-Control: max-age=31536000 for versioned resources.
<IfModule expires_module>
# Disable expirations
ExpiresActive Off
</IfModule>
<IfModule headers_module>
Header append Cache-Control "no-cache"
</IfModule>
# No ETag
FileEtag none
<IfModule headers_module>
Header unset ETag
</IfModule>