perf: async Google Fonts, extend CSS/JS cache to 1 week

This commit is contained in:
Lago
2026-05-10 00:01:22 +02:00
parent db4001aaa5
commit 54d9cdcdc9
2 changed files with 7 additions and 3 deletions
+4 -2
View File
@@ -11,8 +11,10 @@
<link rel="preconnect" href="https://esm.sh" />
<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=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=optional" rel="stylesheet" />
<link rel="stylesheet" href="styles.css" />
<!-- Fonts loaded async: display=optional means they never block render -->
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=optional" as="style" onload="this.onload=null;this.rel='stylesheet'" />
<noscript><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=optional" rel="stylesheet" /></noscript>
<link rel="stylesheet" href="styles.css?v=2" />
<!-- SEO & Social Meta Tags -->
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1" />
<meta name="keywords" content="Sportwagenvermietung Steiermark, Luxusauto mieten, Sportwagenverleih, Ferraris mieten Graz, Porsche mieten Österreich" />
+3 -1
View File
@@ -20,8 +20,10 @@ server {
add_header Cache-Control "public";
try_files $uri =404;
}
# CSS/JS: 1-week cache; config.js is excluded by its exact-match rule above.
location ~* \.(?:css|js)$ {
add_header Cache-Control "no-cache";
expires 7d;
add_header Cache-Control "public, max-age=604800";
try_files $uri =404;
}