Skip to content

Commit 5e66227

Browse files
committed
update
1 parent 2024704 commit 5e66227

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

HTML-Template.7z

60 Bytes
Binary file not shown.

index.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@
158158
/* Critical CSS */
159159
</style>
160160

161+
<link rel="preload" href="./css/style.css" as="style">
161162
<link rel="stylesheet" href="./css/style.css" />
163+
164+
<link rel="preload" href="./script.js" as="script">
162165
</head>
163166

164167
<body>
@@ -169,7 +172,7 @@ <h1>
169172
Starter Template
170173
</h1>
171174
<nav>
172-
<a href="./HTML-Template.zip" download>Download</a>
175+
<a href="./html-template.7z" download>Download</a>
173176
<a
174177
href="https://github.com/harryheman/Modern-HTML-Starter-Template"
175178
target="_blank"

server.js

+6
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ app.use(cors())
66
app.use(helmet())
77

88
app.use((req, res) => {
9+
// security
910
res.setHeader('X-Frame-Options', 'sameorigin')
1011
res.setHeader('Content-Security-Policy', "frame-ancestors 'self';")
12+
13+
// for production
1114
// res.setHeader('Content-Encoding', 'br', 'gzip', 'deflate')
15+
1216
res.setHeader('Cache-Control', 'no-cache')
17+
// res.setHeader('Cache-Control', 'max-age=31536000')
18+
1319
res.sendFile(__dirname + decodeURIComponent(req.url))
1420
})
1521

vscode-html-snippet.json

+3
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@
102102
"\t\t\t/* Critical CSS */",
103103
"\t\t</style>",
104104
"",
105+
"\t\t<link rel='preload' href='./css/style.css' as='style'>",
105106
"\t\t<link rel='stylesheet' href='./css/style.css' />",
107+
"",
108+
"<link rel='preload' href='./script.js' as='script'>",
106109
"\t</head>",
107110
"\t<body>",
108111
"\t\t<!-- HTML5 -->",

0 commit comments

Comments
 (0)