Add cache control headers and redirects for better page loading and caching behavior

This commit is contained in:
Daniel LaForce 2025-04-02 03:26:39 -06:00
parent 9ea14026d9
commit 1b7b29526e
2 changed files with 23 additions and 0 deletions

18
_headers Normal file
View File

@ -0,0 +1,18 @@
/*
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0
# Ensure assets like CSS and JS are allowed to be cached but not for too long
*.css
Cache-Control: public, max-age=3600
*.js
Cache-Control: public, max-age=3600
# Allow caching for static resources like images
/images/*
Cache-Control: public, max-age=86400
# Don't cache PDF files to ensure they're always up to date
*.pdf
Cache-Control: no-cache, no-store, must-revalidate

5
_redirects Normal file
View File

@ -0,0 +1,5 @@
# Redirect default Netlify subdomain to primary domain
https://argobox.pages.dev/* https://argobox.com/:splat 301!
# Handle trailing slashes consistently
/*/ /:splat 301