Cache bust styles.css with query param

This commit is contained in:
Tanner
2026-09-24 00:54:54 +00:00
parent 428398820c
commit d3d2421ac3
12 changed files with 28 additions and 22 deletions
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>3D Printers – Protospace</title> <title>3D Printers – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+6
View File
@@ -81,6 +81,12 @@ Keep the current open-house information consistent:
If this information changes, update the sidebar, relevant page copy, JSON-LD, and `llms.txt` together. If this information changes, update the sidebar, relevant page copy, JSON-LD, and `llms.txt` together.
## Stylesheet cache versioning
- Every HTML page references `styles.css` with a cache-busting epoch query parameter, such as `/styles.css?v=1790211252`.
- Whenever `styles.css` changes, update the `?v=` value in every HTML page to the current Unix epoch timestamp.
- Keep the preload and stylesheet URLs synchronized so both use the same version.
## Assets ## Assets
- Store local images in `/assets/`. - Store local images in `/assets/`.
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>About Protospace – Protospace</title> <title>About Protospace – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>Contact – Protospace</title> <title>Contact – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>Electronics Lab – Protospace</title> <title>Electronics Lab – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>We make space so you can make things – Protospace</title> <title>We make space so you can make things – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>Membership – Protospace</title> <title>Membership – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>Laser Cutters – Protospace</title> <title>Laser Cutters – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>Metal Shop – Protospace</title> <title>Metal Shop – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>Sewing Room – Protospace</title> <title>Sewing Room – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>Spaces – Protospace</title> <title>Spaces – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
+2 -2
View File
@@ -15,8 +15,8 @@
<meta property="og:site_name" content="Protospace" /> <meta property="og:site_name" content="Protospace" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<title>Wood Shop – Protospace</title> <title>Wood Shop – Protospace</title>
<link rel="preload" href="/styles.css" as="style" /> <link rel="preload" href="/styles.css?v=1790211252" as="style" />
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1790211252" />
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",