-
Notifications
You must be signed in to change notification settings - Fork 0
/
_headers
44 lines (33 loc) · 1.32 KB
/
_headers
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
36
37
38
39
40
41
42
43
44
# Cache fonts forever. If the fonts ever change, we will change the filename.
/fonts/*
! Cache-Control
Cache-Control: public, max-age=31536000, immutable
# Cache images for an hour. Unlikely a visit will last longer than this.
/img/*
! Cache-Control
Cache-Control: public, max-age=3600
# Cache the favicon for a week. This will likely never change and a week is reasonable.
/favicon.svg
! Cache-Control
Cache-Control: public, max-age=10080
# Cache CSS forever. When the site builds, the hash changes, so we don't have to worry about this.
/_astro/*.css
! Cache-Control
Cache-Control: public, max-age=31536000, immutable
# Cache JS forever. Same reasoning as the CSS above.
/_astro/*.js
! Cache-Control
Cache-Control: public, max-age=31536000, immutable
# Everything else should get cached for 5 minutes, with stale-while-revalidate logic
/
Cache-Control: private, max-age=900, stale-while-revalidate=31536000
/blog/*
Cache-Control: private, max-age=900, stale-while-revalidate=31536000
/projects/*
Cache-Control: private, max-age=900, stale-while-revalidate=31536000
/about/*
Cache-Control: private, max-age=900, stale-while-revalidate=31536000
/contact/*
Cache-Control: private, max-age=900, stale-while-revalidate=31536000
/resume/*
Cache-Control: private, max-age=900, stale-while-revalidate=31536000