optimisation critical css
This commit is contained in:
parent
471f1c54b8
commit
1d0870d0f9
28
README.md
28
README.md
@ -1,6 +1,32 @@
|
|||||||
# 🌟 Portfolio d'Alexandre Pommier
|
# 🌟 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
|
## 🚀 Aperçu
|
||||||
|
|
||||||
|
|||||||
10
nginx.conf
10
nginx.conf
@ -68,6 +68,10 @@ server {
|
|||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
add_header Vary "Accept-Encoding";
|
add_header Vary "Accept-Encoding";
|
||||||
|
access_log off;
|
||||||
|
|
||||||
|
# Préchargement HTTP/2 Server Push (optionnel)
|
||||||
|
# http2_push_preload on;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cache static assets - Images
|
# Cache static assets - Images
|
||||||
@ -75,6 +79,7 @@ server {
|
|||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
add_header Vary "Accept-Encoding";
|
add_header Vary "Accept-Encoding";
|
||||||
|
access_log off;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cache static assets - CSS/JS avec hash (versionnés)
|
# Cache static assets - CSS/JS avec hash (versionnés)
|
||||||
@ -82,6 +87,10 @@ server {
|
|||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
add_header Vary "Accept-Encoding";
|
add_header Vary "Accept-Encoding";
|
||||||
|
access_log off;
|
||||||
|
|
||||||
|
# Précharger les ressources critiques
|
||||||
|
add_header Link "</assets/fonts/inter.woff2>; rel=preload; as=font; type=font/woff2; crossorigin" always;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cache static assets - Fonts
|
# Cache static assets - Fonts
|
||||||
@ -89,6 +98,7 @@ server {
|
|||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
|
access_log off;
|
||||||
}
|
}
|
||||||
|
|
||||||
# SPA fallback - toutes les routes vers index.html
|
# SPA fallback - toutes les routes vers index.html
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user