SEO Cache-Control for browser caching | Drupal 8

SEO Cache-Control for browser caching

Submitted by editor on Thu, 10/27/2016 - 10:04
Question

How to speed up the site by compressing and caching your content with .htaccess ?

How to use Apache Cache-Control for browser caching using .htaccess file ?

Example:

# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
  #31104000=1Y, 2592000=1M, 604800=1W, 86400=1D 3600=1H
  # Icones, Images .... (ico|jpe?g|png|gif|swf)
  <filesMatch "\.(ico)$">
    Header set Cache-Control "max-age=2592000, public"
  </filesMatch>
  # Fonts
  <filesMatch "\.(eot|otf|svg|ttf|woff)$">
    Header set Cache-Control "max-age=31104000, public"
  </filesMatch>
</ifModule>

Tags

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.