From 1d0870d0f9a4bc3e4fb6db26a0eca85687b89577 Mon Sep 17 00:00:00 2001 From: kinou-p Date: Thu, 2 Oct 2025 19:15:35 +0200 Subject: [PATCH] optimisation critical css --- README.md | 28 +++++++++++++++++++++++++++- nginx.conf | 10 ++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f8c48b..9bcc025 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,32 @@ # 🌟 Portfolio d'Alexandre Pommier -Un portfolio moderne et interactif développé avec React, TypeScript et shadcn/ui, présentant mes projets et compétences techniques. +Un portfolio moderne et interactif développé avec React, TypeScript et shadcn/ui, présentant m## 🛡️ Sécurité + +Ce portfolio implémente des pratiques de sécurité avancées pour protéger contre les vulnérabilités web courantes : + +- **Content Security Policy (CSP)** - Protection contre XSS +- **HSTS** - Forçage HTTPS avec preload +- **COOP/CORP/COEP** - Isolation cross-origin +- **X-Frame-Options** - Protection contre le clickjacking +- **Permissions Policy** - Contrôle des fonctionnalités du navigateur + +Pour plus de détails, consultez [SECURITY.md](./SECURITY.md). + +## ⚡ Performance + +Optimisations avancées pour des Core Web Vitals excellents : + +- **CSS Critique Inliné** - Élimination du blocage de rendu +- **Lazy Loading** - Chargement à la demande des composants et images +- **Code Splitting** - Bundles optimisés et chunking intelligent +- **Resource Hints** - Preconnect et DNS prefetch +- **Image Optimization** - WebP avec thumbnails générés automatiquement + +**Scores Lighthouse cibles** : Performance 95+, Accessibilité 95+, Best Practices 95+, SEO 100 + +Pour plus de détails, consultez [PERFORMANCE.md](./PERFORMANCE.md). + +## 📱 Responsive Design compétences techniques. ## 🚀 Aperçu diff --git a/nginx.conf b/nginx.conf index 6ee873a..fba4fd4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -68,6 +68,10 @@ server { expires 1y; add_header Cache-Control "public, immutable"; add_header Vary "Accept-Encoding"; + access_log off; + + # Préchargement HTTP/2 Server Push (optionnel) + # http2_push_preload on; } # Cache static assets - Images @@ -75,6 +79,7 @@ server { expires 1y; add_header Cache-Control "public, immutable"; add_header Vary "Accept-Encoding"; + access_log off; } # Cache static assets - CSS/JS avec hash (versionnés) @@ -82,6 +87,10 @@ server { expires 1y; add_header Cache-Control "public, immutable"; add_header Vary "Accept-Encoding"; + access_log off; + + # Précharger les ressources critiques + add_header Link "; rel=preload; as=font; type=font/woff2; crossorigin" always; } # Cache static assets - Fonts @@ -89,6 +98,7 @@ server { expires 1y; add_header Cache-Control "public, immutable"; add_header Access-Control-Allow-Origin "*"; + access_log off; } # SPA fallback - toutes les routes vers index.html