Speed up your website load time by this code

1 replies
  • SEO
  • |
Hello all,
I have found this code online....

Code:
    Header unset Pragma
    FileETag None
    Header unset ETag
     
    <IfModule mod_headers.c>
      <FilesMatch "\.(js|css|xml|gz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    </IfModule>
     
    <FilesMatch "\.(gif|jpg|jpeg|png|ico)$">
        ExpiresActive On
        ExpiresDefault "access plus 1 month"
    </FilesMatch>
     
    <FilesMatch "\.(css|js|html?|xml|txt)$">
        ExpiresActive On
        ExpiresDefault "access plus 1 week"
    </FilesMatch>
     
    # 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
     
    # Or, compress certain file types by extension:
    <Files *.html>
    SetOutputFilter DEFLATE
</Files>
You have to copy paste it inside .htaccess which is located in file-manager with the rest of your website files.

I have copy pasted it. But a block of code is not under-stable by me..

Here is the block of code I am confused about:
Code:
    <FilesMatch "\.(css|js|html?|xml|txt)$">
        ExpiresActive On
        ExpiresDefault "access plus 1 week"
    </FilesMatch>
What does this mean, all my css, js, html, xml files will be expired after 7 days from search results/google?

Hope someone expert will describe this full code nicely.

Thanks
#code #load #speed #time #website
  • Profile picture of the author Dinospider
    Banned
    I think this would be best put into the programming section.
    {{ DiscussionBoard.errors[6255078].message }}

Trending Topics