Imprimer la Page | Fermez la fenêtre

Améliorer le pagespeed PageSpeed Insights

Imprimé depuis: Forum openElement
Categorie:

openElement


Nom du Forum: Tutoriaux utilisateurs
Description du Forum: Ecrivez ou consultez des tutoriaux OpenElement
Pas de questions dans cette rubrique merci.
URL: https://forums.openelement.uk/fr/forum_posts.asp?TID=20568
Date: 19 Avr 2024 à 07:47
Version logiciel: Web Wiz Forums 12.04 - http://www.webwizforums.com


Sujet: Améliorer le pagespeed PageSpeed Insights
Posté par: chprieur
Sujet: Améliorer le pagespeed PageSpeed Insights
Posté le: 05 Mar 2015 à 15:46
Voici ce que j'ai trouvé, et qui semble fonctionner puisque cela a amélioré le pagespeed Insights de mon site :

Test de la page  : http://developers.google.com/speed/pagespeed/insights/" rel="nofollow - https://developers.google.com/speed/pagespeed/insights/

1- Autoriser la compression gzip

---> OE / Projet / htaccess : ajouter une commande / Script libre

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript



2 - Contrôle du cache navigateur :

---> OE / Projet / htaccess : ajouter une commande / Script libre


# contrôle du cache navigateur - Expire headers 
    <IfModule mod_expires.c> 
        ExpiresActive On 
        ExpiresDefault "access plus 7200 seconds" 
        ExpiresByType image/jpg             "access plus 1 week" 
        ExpiresByType image/jpeg            "access plus 1 week" 
        ExpiresByType image/png             "access plus 1 week" 
        ExpiresByType image/gif             "access plus 1 week" 
        AddType image/x-icon .ico 
        ExpiresByType image/ico             "access plus 1 week" 
        ExpiresByType image/icon            "access plus 1 week" 
        ExpiresByType image/x-icon          "access plus 1 week" 
        ExpiresByType text/css              "access plus 1 week" 
        ExpiresByType text/javascript       "access plus 1 week" 
        ExpiresByType text/html             "access plus 7200 seconds" 
        ExpiresByType application/xhtml+xml     "access plus 7200 seconds" 
        ExpiresByType application/javascript    "access plus 1 week" 
        ExpiresByType application/x-javascript  "access plus 1 week" 
        ExpiresByType application/x-shockwave-flash "access plus 1 week" 
    </IfModule>
 
    ## Mise en cache cache-control
    <IfModule mod_headers.c>
    <FilesMatch "\\.(ico|jpe?g|png|gif|swf)$">
        Header set Cache-Control "max-age=2592000, public"
    </FilesMatch>
    <FilesMatch "\\.(css)$">
        Header set Cache-Control "max-age=2592000, public"
    </FilesMatch>
    <FilesMatch "\\.(js)$">
        Header set Cache-Control "max-age=2592000, private"
    </FilesMatch>
    <FilesMatch "\\.(x?html?|php)$">
        Header set Cache-Control "max-age=600, private, must-revalidate"
    </FilesMatch>



-------------
http://www.svl-nevers.fr - http://www.svl-nevers.fr



Imprimer la Page | Fermez la fenêtre

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net