josesalazar2025 commited on
Commit
084212f
·
1 Parent(s): 15c6ffb

Add cache-busting query params and restore 1-year CSS/JS cache policy

Browse files

Use ?v=2 on CSS and JS links so browsers fetch fresh files after this deploy.
Revert .htaccess to 1-year immutable cache to keep Lighthouse score intact.
Bump v= on future deploys that change CSS or JS.

Files changed (2) hide show
  1. .htaccess +1 -1
  2. index.html +2 -2
.htaccess CHANGED
@@ -15,7 +15,7 @@
15
  # HTML — short cache, content can change
16
  ExpiresByType text/html "access plus 1 hour"
17
 
18
- # CSS and JS — 1 year (filenames are stable)
19
  ExpiresByType text/css "access plus 1 year"
20
  ExpiresByType application/javascript "access plus 1 year"
21
  ExpiresByType text/javascript "access plus 1 year"
 
15
  # HTML — short cache, content can change
16
  ExpiresByType text/html "access plus 1 hour"
17
 
18
+ # CSS and JS — 1 year (use ?v= query param on deploys to bust cache)
19
  ExpiresByType text/css "access plus 1 year"
20
  ExpiresByType application/javascript "access plus 1 year"
21
  ExpiresByType text/javascript "access plus 1 year"
index.html CHANGED
@@ -17,7 +17,7 @@
17
  <link rel="preload" href="assets/fonts/JetBrains_Mono/JetBrainsMono-VariableFont_wght.ttf" as="font" type="font/ttf" crossorigin>
18
 
19
  <link rel="icon" href="assets/icons/favicon.ico">
20
- <link rel="stylesheet" href="css/styles.css">
21
  </head>
22
  <body>
23
 
@@ -847,7 +847,7 @@
847
  </div>
848
  </div>
849
 
850
- <script type="module" src="js/main.js"></script>
851
 
852
  </body>
853
  </html>
 
17
  <link rel="preload" href="assets/fonts/JetBrains_Mono/JetBrainsMono-VariableFont_wght.ttf" as="font" type="font/ttf" crossorigin>
18
 
19
  <link rel="icon" href="assets/icons/favicon.ico">
20
+ <link rel="stylesheet" href="css/styles.css?v=2">
21
  </head>
22
  <body>
23
 
 
847
  </div>
848
  </div>
849
 
850
+ <script type="module" src="js/main.js?v=2"></script>
851
 
852
  </body>
853
  </html>