Leverage Browser Caching
-
I had seen support for this, but I realized that swift doesn’t add anything to .htacess
only thing commenting on .htacess
###BEGIN Swift Performance Lite### <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{QUERY_STRING} ^$ RewriteCond %{HTTP:Cookie} !^.*(wordpress_logged_in).*$ RewriteCond %{REQUEST_URI} !^/(TOGGLED)/swift-performance/([^/]*)/assetproxy RewriteCond /(TOGGLED)/swift-performance/%{HTTP_HOST}%{REQUEST_URI}/desktop/unauthenticated/index.html -f RewriteRule (.*) (TOGGLED)/swift-performance/%{HTTP_HOST}%{REQUEST_URI}/desktop/unauthenticated/index.html [L] </IfModule> # ---------------------------------------------------------------------- # CORS-enabled images (@crossorigin) # ---------------------------------------------------------------------- # Send CORS headers if browsers request them; enabled by default for images. # developer.mozilla.org/en/CORS_Enabled_Image # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/ # wiki.mozilla.org/Security/Reviews/crossoriginAttribute <IfModule mod_setenvif.c> <IfModule mod_headers.c> # mod_headers, y u no match by Content-Type?! <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$"> SetEnvIf Origin ":" IS_CORS Header set Access-Control-Allow-Origin "*" env=IS_CORS </FilesMatch> </IfModule> </IfModule> # ---------------------------------------------------------------------- # Webfont access # ---------------------------------------------------------------------- # Allow access from all domains for webfonts. # Alternatively you could only whitelist your # subdomains like "subdomain.example.com". <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> </IfModule> ###END Swift Performance Lite###
Then I wanted to know how to solve this “Leverage Browser Caching”, because in GTmetrix you are warning me
- The topic ‘Leverage Browser Caching’ is closed to new replies.