Bonjour,
je suis en train d'essayer d'optimiser la vitesse d'un de mes sites.
j'ai utilisé
http://gtmetrix.com/reports/jardin-j...r.com/hjjYjTl2
et je souhaiterais améliorer le score pour "Leverage browser caching" dans Page Speed et "Add Expires headers" pour Yslow
Or dans mon .htaccess j'ai indiqué :
Or celà n'a eu aucune incidence sur les résultats. Or tout ce que j'ai lu à ce sujet m'indique que c'est la "bonne" façon de gérer le cache en fonction du type de ressource.Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 #needs mod_headers and mod_expires <ifModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 hours" ExpiresByType video/x-flv "access plus 1 year" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType text/css "access plus 1 month" ExpiresByType application/x-javascript "access plus 3 hours" # 1 YEAR - doesn't change often # <FilesMatch "\.(flv|ico|pdf|mov|ppt)$"> # ExpiresDefault A29030400 # </FilesMatch> # 1 WEEK - possible to be changed, unlikely # <FilesMatch "\.(jpg|jpeg|png|gif|swf)$"> # ExpiresDefault A604800 # </FilesMatch> # 3 HOUR - core content, changes quickly # <FilesMatch "\.(xml|js|css)$"> # ExpiresDefault A10800 # </FilesMatch> </ifModule> #COMPRESSION <IfModule mod_headers.c> <FilesMatch "\.(flv|ico|pdf|mov|ppt)$"> Header set Cache-Control "max-age=29030400, public" </FilesMatch> # 1 WEEK - possible to be changed, unlikely <FilesMatch "\.(jpg|jpeg|png|gif|swf)$"> Header set Cache-Control "max-age=604800, public" </FilesMatch> # 3 HOUR - core content, changes quickly <FilesMatch "\.(xml|js|css)$"> Header set Cache-Control "max-age=10800, proxy-revalidate" </FilesMatch> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary Accept-Encoding </FilesMatch> </IfModule>
Pouvez-vous me donner des pistes ? Merci
j'ai fait le test aussi sur
http://www.webpagetest.org/pagespeed...run=1&cached=0
avec le même résultat