Use single ASSET_VERSION variable for cache busting
Now just update the ASSET_VERSION number in one place to bust cache for both CSS and JS
This commit is contained in:
+6
-2
@@ -7,7 +7,11 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/style.css?v=4">
|
||||
<script>
|
||||
// Cache buster version - update this number to force reload
|
||||
const ASSET_VERSION = '5';
|
||||
</script>
|
||||
<link rel="stylesheet" href="css/style.css" onload="this.href='css/style.css?v='+ASSET_VERSION">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Mobile Menu Toggle -->
|
||||
@@ -603,6 +607,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/main.js?v=4"></script>
|
||||
<script src="js/main.js" onload="this.src='js/main.js?v='+ASSET_VERSION"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user