From cf7f5599266d30ff7c67deff55043d0530c5db34 Mon Sep 17 00:00:00 2001
From: Siick <dev@siick.fr>
Date: Thu, 1 Apr 2021 08:21:59 +0200
Subject: [PATCH] =?UTF-8?q?ajustement=20pour=20am=C3=A9liorer=20la=20vites?=
 =?UTF-8?q?se=20de=20chargement?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .htaccess  | 32 ++++++++++++++++++++++++++++++++
 head.php   |  6 +++---
 index.html |  8 ++++++--
 3 files changed, 41 insertions(+), 5 deletions(-)
 create mode 100644 .htaccess

diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..0d83121
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,32 @@
+<IfModule mod_expires.c>
+  ExpiresActive On
+
+ # Images
+  ExpiresByType image/jpeg "access plus 1 year"
+  ExpiresByType image/gif "access plus 1 year"
+  ExpiresByType image/png "access plus 1 year"
+  ExpiresByType image/webp "access plus 1 year"
+  ExpiresByType image/svg+xml "access plus 1 year"
+  ExpiresByType image/x-icon "access plus 1 year"
+
+  # Video
+  ExpiresByType video/webm "access plus 1 year"
+  ExpiresByType video/mp4 "access plus 1 year"
+  ExpiresByType video/mpeg "access plus 1 year"
+
+  # Fonts
+  ExpiresByType font/ttf "access plus 1 year"
+  ExpiresByType font/otf "access plus 1 year"
+  ExpiresByType font/woff "access plus 1 year"
+  ExpiresByType font/woff2 "access plus 1 year"
+  ExpiresByType application/font-woff "access plus 1 year"
+
+  # CSS, JavaScript
+  ExpiresByType text/css "access plus 1 month"
+  ExpiresByType text/javascript "access plus 1 month"
+  ExpiresByType application/javascript "access plus 1 month"
+
+  # Others
+  ExpiresByType application/pdf "access plus 1 month"
+  ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
+</IfModule>
diff --git a/head.php b/head.php
index 67ed4b9..a814427 100644
--- a/head.php
+++ b/head.php
@@ -1,9 +1,9 @@
 <meta charset="utf-8" />
 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
-<link rel="stylesheet" href="assets/css/main.css" />
-<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
+<link rel="stylesheet" href="assets/css/main.css" media="print" onload="this.media='all'">
+<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" media="print" onload="this.media='all'">
+<link rel="stylesheet" href="assets/css/all.min.css" media="print" onload="this.media='all'">
 <link rel="shortcut icon" type="image/png" href="images/onirik_logo2.png"/>
-<link rel="stylesheet" href="assets/css/all.min.css">
 <noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
 <!-- Matomo -->
 <script type="text/javascript">
diff --git a/index.html b/index.html
index d068e1b..40bd8b2 100644
--- a/index.html
+++ b/index.html
@@ -9,10 +9,14 @@
 		<title>ONIRIK | Welcome</title>
 		<meta charset="utf-8" />
 		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
-		<link rel="stylesheet" href="assets/css/main.css" />
+		<link rel="stylesheet" href="assets/css/main.css" media="print" onload="this.media='all'">
+		<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" media="print" onload="this.media='all'">
+		<link rel="stylesheet" href="assets/css/all.min.css" media="print" onload="this.media='all'">
+
+		<!--<link rel="stylesheet" href="assets/css/main.css" />
 		<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
+		<link rel="stylesheet" href="assets/css/all.min.css"> -->
 		<link rel="shortcut icon" type="image/png" href="images/onirik_logo2.png"/>
-		<link rel="stylesheet" href="assets/css/all.min.css">
 		<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
 		<!-- START - We recommend to place the below code in head tag of your website html  -->
 		<style>
-- 
GitLab