Current time: 09-21-2019, 11:08 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Leverage browser caching of static assets
02-27-2013, 08:11 PM
Post: #1
Leverage browser caching of static assets
Hi,

I have a problem with the Leverage browser caching of static assets.

I think my .htaccess is not running.

That's the result :

Code:
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-footer.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-box-special.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmadvblock4/advertising_custom.png
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-block-footer.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-cat-sub.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/categories_plus.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-title-special.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/175-493-medium/kit-batterie-iphone-4-outils-iphone.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/222-522-home/kit-transformation-iphone-4s-noir-ecran-vitre-arriere-bouton-home-outils-bumper-noir.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/225-521-home/kit-transformation-iphone-4-noir-ecran-vitre-arriere-bouton-home-outils-bumper-noir.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/213-501-home/ecouteurs-iphone-avec-micro-et-controle-du-volume-pour-iphone-3g-s-4-s.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/219-508-home/connecteur-de-charge-dock-iphone-4.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-btn.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-title.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-li-sub.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmnivoslider/slides/slide_00.jpg
FAILED - (No max-age or expires) - http://init.zopim.com/crossdomain.xml
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/238-538-home/nappe-prise-casque-jack-pour-iphone-3gs-noir.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/img/favicon.ico?1361265039
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/bg-caption.png
FAILED - (No max-age or expires) - http://init.zopim.com/register
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/pagination.png
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/211-499-home/kit-chargeur-3-en-1-pour-iphone-usb-secteur-voiture.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/180-531-home/coque-batterie-iphone-4-iphone-4s.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmnivoslider/slides/slide_02.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmnivoslider/slides/slide_01.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmadvblock2/advertising_custom.png
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmadvblock3/advertising_custom.png
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmadvblock1/advertising_custom.png
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-featured.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/241-537-home/kit-transformation-iphone-4s-blanc-ecran-vitre-arriere-bouton-home-outils.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/js/jscript_xjquery.jqtransform.js
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmnivoslider/js/nivo.slider.js
FAILED - (No max-age or expires) - http://log3.optimizely.com/event?a=166899118&d=166899118&y=false&f=171029936,166899120&n=http%3A%2F%2Fwww.depanne-iphone.com%2F&u=oeu1361958865093r0.8759589673785386&t=1361958865093
FAILED - (No max-age or expires) - http://c.jirafe.com/jirafe.js
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-main.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/img/logo.png?1361265039
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmcategories/superfish.js
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/js/script.js
FAILED - (No max-age or expires) - http://fonts.googleapis.com/css?family=Open+Sans:600
FAILED - (No max-age or expires) - http://fonts.googleapis.com/css?family=Open+Sans:700
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/cache/3d32678236c093f95e82100a11a57388_all.css
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/cache/d4b0de07593950f819ebf5b48afcd0fb.js
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/js/cookies.js
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/bg-search.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/bg-header.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/176-445-home/bumper-pour-iphone-5.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/modules/tmnivoslider/slides/slide_03.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/202-485-home/kit-transformation-iphone-4-noir-ecran-vitre-arriere-bouton-home-outils.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/203-486-home/kit-transformation-iphone-4s-noir-ecran-vitre-arriere-bouton-home-outils.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/240-536-home/kit-transformation-iphone-4s-blanc-ecran-vitre-arriere-bouton-home-outils-bumper-blanc.jpg
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/border-cat.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/border-left.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-btn-search.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/bg-cart.png
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/border-info.gif
FAILED - (No max-age or expires) - http://www.depanne-iphone.com/themes/theme330/img/tail-cat.gif
FAILED - (60 seconds) - http://cdn.optimizely.com/js/166899118.js
FAILED - (10.0 minutes) - http://www.depanne-iphone.com/cart.php?_=1361958865250&ajax=true&token=50c78fbd4002c92287d33db076e356f4
FAILED - (10.0 minutes) - http://www.depanne-iphone.com

And this is the content of my .htaccess

Code:
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/javascript "access plus 1 week"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-javascript "access plus 1 week"
    ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
    ExpiresByType image/x-icon "access plus 1 year"
      ExpiresByType text/html "access plus 600 seconds"
    ExpiresByType application/xhtml+xml "access plus 600 seconds"
</IfModule>

Thank you for your replies.
Find all posts by this user
Quote this message in a reply
02-28-2013, 02:06 AM (This post was last modified: 02-28-2013 02:06 AM by avalanch.)
Post: #2
RE: Leverage browser caching of static assets
replace your contents of your htaccess with this

Code:
# Author: Final Kaoss (aka: Extreme-Gaming)
# Version 2.6
RewriteEngine on

#Deny attempts to view the Htaccess file.
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
# BEGIN Browser Caching/Headers
<IfModule mod_mime.c>
    AddType text/css .css
    AddType text/richtext .rtf .rtx
    AddType image/svg+xml .svg .svgz
    AddType text/plain .txt
    AddType text/xsd .xsd
    AddType text/xsl .xsl
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType image/bmp .bmp
    AddType application/java .class
    AddType video/divx .divx
    AddType application/msword .doc .docx
    AddType application/x-msdownload .exe
    AddType image/gif .gif
    AddType application/x-gzip .gz .gzip
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType application/vnd.ms-access .mdb
    AddType audio/midi .mid .midi
    AddType video/quicktime .mov .qt
    AddType audio/mpeg .mp3 .m4a
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe
    AddType application/vnd.ms-project .mpp
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.text .odt
    AddType audio/ogg .ogg
    AddType application/pdf .pdf
    AddType image/png .png
    AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio/x-realaudio .ra .ram
    AddType application/x-shockwave-flash .swf
    AddType application/x-tar .tar
    AddType image/tiff .tif .tiff
    AddType audio/wav .wav
    AddType audio/wma .wma
    AddType application/vnd.ms-write .wri
    AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css A2628000
    ExpiresByType text/richtext A3600
    ExpiresByType image/svg+xml A3600
    ExpiresByType text/plain A3600
    ExpiresByType text/xsd A3600
    ExpiresByType text/xsl A3600
    ExpiresByType video/asf A2628000
    ExpiresByType video/avi A2628000
    ExpiresByType image/bmp A2628000
    ExpiresByType application/java A2628000
    ExpiresByType video/divx A2628000
    ExpiresByType application/msword A2628000
    ExpiresByType application/x-msdownload A2628000
    ExpiresByType image/gif A2628000
    ExpiresByType application/x-gzip A2628000
    ExpiresByType image/x-icon A2628000
    ExpiresByType image/jpeg A2628000
    ExpiresByType application/vnd.ms-access A2628000
    ExpiresByType audio/midi A2628000
    ExpiresByType video/quicktime A2628000
    ExpiresByType audio/mpeg A2628000
    ExpiresByType video/mp4 A2628000
    ExpiresByType video/mpeg A2628000
    ExpiresByType application/vnd.ms-project A2628000
    ExpiresByType application/vnd.oasis.opendocument.database A2628000
    ExpiresByType application/vnd.oasis.opendocument.chart A2628000
    ExpiresByType application/vnd.oasis.opendocument.formula A2628000
    ExpiresByType application/vnd.oasis.opendocument.graphics A2628000
    ExpiresByType application/vnd.oasis.opendocument.presentation A2628000
    ExpiresByType application/vnd.oasis.opendocument.spreadsheet A2628000
    ExpiresByType application/vnd.oasis.opendocument.text A2628000
    ExpiresByType audio/ogg A2628000
    ExpiresByType application/pdf A2628000
    ExpiresByType image/png A2628000
    ExpiresByType application/vnd.ms-powerpoint A2628000
    ExpiresByType audio/x-realaudio A2628000
    ExpiresByType application/x-shockwave-flash A2628000
    ExpiresByType application/x-tar A2628000
    ExpiresByType image/tiff A2628000
    ExpiresByType audio/wav A2628000
    ExpiresByType audio/wma A2628000
    ExpiresByType application/vnd.ms-write A2628000
    ExpiresByType application/vnd.ms-excel A2628000
    ExpiresByType application/zip A2628000
</IfModule>
<IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    </IfModule>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
    </IfModule>
</IfModule>
<FilesMatch "\.(css|CSS|)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    </IfModule>
</FilesMatch>
<FilesMatch "\.(rtf|rtx|svg|svgz|txt|xsd|xsl|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    </IfModule>
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|​jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods​|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xl​sx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EXE|GIF|GZ|GZIP|I​CO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF​|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SWF|TAR|TIF|TIFF|WAV|WMA|WR​I|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    </IfModule>
</FilesMatch>
# End Browser Caching/Headers
Visit this user's website Find all posts by this user
Quote this message in a reply
05-27-2013, 03:45 AM
Post: #3
RE: Leverage browser caching of static assets
@ Avalanch.

Have you compiled this .htaccess your self?

I am interested in the cache optimisations you have used.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)