diff --git a/.htaccess b/.htaccess index e1d2560..1c1b46c 100644 --- a/.htaccess +++ b/.htaccess @@ -1 +1,49 @@ -Options +Indexes +# ── FWS Linux — .htaccess (performance + sécurité) ────────────────────────── + +# Pas de listing de répertoires (ex : /p/, /api/, /admin/) +Options -Indexes + +# Types MIME manquants (selon la config Apache du conteneur) + + AddType image/webp .webp + AddType image/avif .avif + + + + # Sécurité minimale + Header set X-Content-Type-Options "nosniff" + Header set Referrer-Policy "strict-origin-when-cross-origin" + Header set X-Frame-Options "SAMEORIGIN" + + +# ── Compression (gzip) ─────────────────────────────────────────────────────── + + AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/json application/xml text/xml image/svg+xml + # Ne pas compresser ce qui est déjà compressé + SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|webp|avif|zip|gz|7z|xz)$ no-gzip dont-vary + + +# ── Cache navigateur ───────────────────────────────────────────────────────── +# Le HTML est chargé en AJAX par le routeur (/?p/…) : on le revalide toujours, +# mais les fichiers statiques (css/js/img) peuvent être gardés longtemps. + + # Pages html chargées dynamiquement → revalidation (304 rapide si inchangé) + + Header set Cache-Control "no-cache" + + + # CSS / JS : 7 jours + revalidation + + Header set Cache-Control "public, max-age=604800, must-revalidate" + + + # Images : 30 jours (noms de fichiers stables) + + Header set Cache-Control "public, max-age=2592000" + + + # API + PHP : jamais de cache + + Header set Cache-Control "no-store" + + diff --git a/index.html b/index.html index 022ebe4..a9ea618 100644 --- a/index.html +++ b/index.html @@ -19,6 +19,12 @@ + + + + + + @@ -98,7 +104,6 @@ - diff --git a/p/assets/img/hero/KDE.png b/p/assets/img/hero/KDE.png deleted file mode 100644 index 3ad5942..0000000 Binary files a/p/assets/img/hero/KDE.png and /dev/null differ diff --git a/p/assets/img/hero/KDE.webp b/p/assets/img/hero/KDE.webp new file mode 100644 index 0000000..e8ba7e9 Binary files /dev/null and b/p/assets/img/hero/KDE.webp differ diff --git a/p/assets/img/hero/gnome.png b/p/assets/img/hero/gnome.png deleted file mode 100644 index e81bbf4..0000000 Binary files a/p/assets/img/hero/gnome.png and /dev/null differ diff --git a/p/assets/img/hero/gnome.webp b/p/assets/img/hero/gnome.webp new file mode 100644 index 0000000..837024f Binary files /dev/null and b/p/assets/img/hero/gnome.webp differ diff --git a/p/assets/img/hero/hyprland.png b/p/assets/img/hero/hyprland.png deleted file mode 100644 index 95c9b98..0000000 Binary files a/p/assets/img/hero/hyprland.png and /dev/null differ diff --git a/p/assets/img/hero/hyprland.webp b/p/assets/img/hero/hyprland.webp new file mode 100644 index 0000000..382e08a Binary files /dev/null and b/p/assets/img/hero/hyprland.webp differ diff --git a/p/assets/img/hero/install.png b/p/assets/img/hero/install.png deleted file mode 100644 index b2ee28f..0000000 Binary files a/p/assets/img/hero/install.png and /dev/null differ diff --git a/p/assets/img/hero/install.webp b/p/assets/img/hero/install.webp new file mode 100644 index 0000000..0a3b198 Binary files /dev/null and b/p/assets/img/hero/install.webp differ diff --git a/p/assets/img/hero/xfce.png b/p/assets/img/hero/xfce.png deleted file mode 100644 index bd6bb09..0000000 Binary files a/p/assets/img/hero/xfce.png and /dev/null differ diff --git a/p/assets/img/hero/xfce.webp b/p/assets/img/hero/xfce.webp new file mode 100644 index 0000000..6a51965 Binary files /dev/null and b/p/assets/img/hero/xfce.webp differ diff --git a/p/assets/main-nav/app.js b/p/assets/main-nav/app.js index 1b8ad02..197771f 100644 --- a/p/assets/main-nav/app.js +++ b/p/assets/main-nav/app.js @@ -161,7 +161,10 @@ clearInjectedPageScripts(); const source = routeToSource(route); - const response = await fetch(source, { cache: "no-store" }); + // On laisse le cache HTTP faire son travail (revalidation 304) : + // le .htaccess renvoie « Cache-Control: no-cache » sur le HTML, + // donc on revalide à chaque navigation sans re-télécharger le corps. + const response = await fetch(source); if (!response.ok) { throw new Error(`Impossible de charger ${source} (${response.status})`); } diff --git a/p/index/index.html b/p/index/index.html index 09669a8..6685f92 100644 --- a/p/index/index.html +++ b/p/index/index.html @@ -12,9 +12,9 @@