Skip to content

Commit 4110409

Browse files
Vue upgrade and caching optimisation
1 parent da11ddd commit 4110409

File tree

6 files changed

+88
-80
lines changed

6 files changed

+88
-80
lines changed

index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@
3232
content="My name is Tom Stirrop-Metcalfe. I am a passionate and driven engineering leader who wants to enable others to realise their full potential."
3333
/>
3434
<meta name="theme-color" content="#384452" />
35-
<!-- Cache busting meta tag -->
36-
<meta name="build-timestamp" content="<%= VITE_BUILD_TIMESTAMP %>" />
35+
<!-- Cache busting meta tag and disable HTML caching -->
36+
<meta name="build-timestamp" content="%VITE_BUILD_TIMESTAMP%" />
37+
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
38+
<meta http-equiv="Pragma" content="no-cache" />
39+
<meta http-equiv="Expires" content="0" />
3740
<title>Tom Stirrop-Metcalfe | Software Engineer & Engineering Manager | Birmingham</title>
3841

3942
<!-- Open Graph / Facebook -->

package-lock.json

Lines changed: 57 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"dependencies": {
1717
"pinia": "^3.0.4",
18-
"vue": "^3.5.27",
18+
"vue": "^3.5.28",
1919
"vue-router": "^4.5.1"
2020
},
2121
"devDependencies": {

src/App.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
import Header from './components/Header.vue';
1818
import Footer from './components/Footer.vue';
1919
import MrRobot from './components/MrRobot.vue';
20+
import { useHead } from '@unhead/vue';
21+
22+
// Ensure all generated HTML pages include no-cache directives
23+
useHead({
24+
meta: [
25+
{ 'http-equiv': 'Cache-Control', content: 'no-cache, no-store, must-revalidate' },
26+
{ 'http-equiv': 'Pragma', content: 'no-cache' },
27+
{ 'http-equiv': 'Expires', content: '0' },
28+
],
29+
});
2030
</script>
2131

2232
<style>

0 commit comments

Comments
 (0)