From 1b7b29526e8afccae909ff4d9607f8b4d363ff9c Mon Sep 17 00:00:00 2001 From: Daniel LaForce Date: Wed, 2 Apr 2025 03:26:39 -0600 Subject: [PATCH] Add cache control headers and redirects for better page loading and caching behavior --- _headers | 18 ++++++++++++++++++ _redirects | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 _headers create mode 100644 _redirects diff --git a/_headers b/_headers new file mode 100644 index 0000000..a7cccff --- /dev/null +++ b/_headers @@ -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 \ No newline at end of file diff --git a/_redirects b/_redirects new file mode 100644 index 0000000..10f94bf --- /dev/null +++ b/_redirects @@ -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 \ No newline at end of file