-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_headers
More file actions
29 lines (22 loc) · 852 Bytes
/
_headers
File metadata and controls
29 lines (22 loc) · 852 Bytes
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
# Cache control for GitHub Pages (via Cloudflare or CDN)
# This file should be deployed to the live branch
# HTML files - no cache, always check for updates
/*.html
Cache-Control: no-cache, no-store, must-revalidate
/
Cache-Control: no-cache, no-store, must-revalidate
# Versioned static assets - cache aggressively (1 year)
# These have version hashes in URLs so safe to cache long-term
/static/js/*.min.js
Cache-Control: public, max-age=31536000, immutable
/static/css/*.min.css
Cache-Control: public, max-age=31536000, immutable
# Images and fonts - cache for 1 month
/static/images/*
Cache-Control: public, max-age=2592000
# Service worker - no cache
/sw.js
Cache-Control: no-cache, no-store, must-revalidate
# Other static assets - cache for 1 week
/static/*
Cache-Control: public, max-age=604800