Autoptimize generating error in GTMetrix: Error: Add Expires headers
-
Autoptimize generating error in GTMetrix:
Error: Add Expires headersYou cant see on this link:
https://gtmetrix.com/reports/cmmontanha.es.gov.br/DPs6jdgGHow to fix it?
The page I need help with: [log in to see the link]
-
Hi Frank, thank you a lot for your support, please where is the option “serve as static files” ?
Settings -> Autoptimize -> JS, CSS & HTML settings -> bottom of page under “Misc Options” -> “Save aggregated script/css as static files?” ??
ok, after this: SAVE MODIFICATIONS AND ERASE CACHE? or only SAVE MODIFICATIONS.
entirely your choice ??
Hi Frank,
the result of this modification:Settings -> Autoptimize -> JS, CSS & HTML settings -> bottom of page under “Misc Options” -> REMOVE FLAG ON “Save aggregated script/css as static files”
is a disaster: the web pages were a big chaos of images and text. With the flag ON the web site is back to normal.
[Wordpress 5.2.3, Theme: WooThemes Canvas 5.12, WooFramework: 6.2.9]
in that case something (a security plugin) is probably restricting execution of .php files in
wp-content/cache
, you’ll have to find and disable that.To restrict the search, which plugin could be responsible for the problem among the following?
Autoptimize
Classic Editor
Consenso al cookie GDPR
Contact Form 7
Google Analytics Dashboard per WP (GADWP)
Google Doc Embedder
iframe
MC4WP: Mailchimp for WordPress
No Category Base (WPML)
WooThemes Projects
Really Simple CAPTCHA
Redirection
Responsive Posts Carousel
Reveal IDs
Shortcodes Ultimate
Smart Slider 3
Table of Contents Plus
Tag Pages
Team Members
Testimonial Rotator
TinyMCE Advanced
WhatsApp Chat
WooCommerce Helper
WordPress Related Posts
WP YouTube Lyte
WPML (5 plugin)
YITH Infinite Scrolling
Yoast SEO
Yoast SEO Multilingualnothing jumps out I’m afraid, so no idea :-/
autoptimize header and ppom plugin date picker is not working, rest the eplugin did it’s job pretty we.. Can anybody help?
website-planyourmemories.inBest is to make changes at webserver level, see e.g. this article for more info on how to do so saithjeet .
hi
I have similar issues, i am currently using WP Rocket to optimize for my website that is https://beingayogic.com connected through Cloudflare, Below i share all the possible info that could help you provide me with a fix thanks.
Please do notify me via email [email protected]Regards,
FerozCurrently my status at Gmatrix shows as follow, kindly help me on the same
PageSpeed Score : A92%, YSlow Score : C77%, Fully Loaded Time: 4.8s, Total Page Size:2.28MB, Requests 70PageSpeed ISSUES: Leverage browser caching – C (72)
Leverage browser caching for the following cacheable resources:https://maps.googleapis.com/maps/api/js?client=google-maps-embed&paint_origin=&libraries=geometry,search&v=3.exp&language=en&callback=onApiLoad (30 minutes)
https://tpc.googlesyndication.com/sodar/sodar2.js (50 minutes)
https://www.googletagservices.com/activeview/js/current/osd.js?cb=%2Fr20100101 (50 minutes)
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (1 hour)
https://smartarget.online/main.css?ver=0.152 (4 hours)
https://smartarget.online/main.js?ver=0.152&u=18267e1176030f91db6789e97e9daac2a3ad154e&forceLocation=https%3A%2F%2Fbeingayogic.com%2F (4 hours)
https://beingayogic.com/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js (2 days)YSlow ISSUES : Add Expires Headers F-(12)
There are 8 static components without a far-future expiration date.https://fonts.googleapis.com/css?family=Playfair%20Display%3A400%2C700%7COpen%20Sans%3A400italic%2C400%2C600italic%2C600%2C700italic%2C700&display=swap
https://ajax.cloudflare.com/cdn-cgi/scripts/7089c43e/cloudflare-static/rocket-loader.min.js
https://beingayogic.com/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js
https://fonts.googleapis.com/css?family=Montserrat:400,700
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js
https://adservice.google.com.hk/adsid/integrator.js?domain=beingayogic.com
https://adservice.google.com/adsid/integrator.js?domain=beingayogic.com
https://www.googletagservices.com/activeview/js/current/osd.js?cb=%2Fr20100101ISSUE : Make Fewer HTTP Requests E (52)
This page has 13 external Javascript scripts. Try combining them into one.
This page has 4 external stylesheets. Try combining them into one.ISSUE : Reduce DNS lookups F (35)
The components are split over more than 4 domainsbeingayogic.com: 21 components, 2379.7K (358.5K GZip)
fonts.googleapis.com: 2 components, 22.6K (2.2K GZip)
maxcdn.bootstrapcdn.com: 1 component, 27.4K (6.2K GZip)
ajax.cloudflare.com: 1 component, 12.3K (4.3K GZip)
pagead2.googlesyndication.com: 4 components, 349.2K (132.5K GZip)
https://www.google.com: 4 components, 4.0K (1.5K GZip)
adservice.google.com.hk: 1 component, 0.1K (0.1K GZip)
adservice.google.com: 1 component, 0.1K (0.1K GZip)
googleads.g.doubleclick.net: 2 components, 10.6K (4.5K GZip)
https://www.googletagservices.com: 1 component, 75.5K (27.9K GZip)
static.addtoany.com: 3 components, 163.8K (61.6K GZip)
api.smartarget.online: 2 components, 0.2K (1.1K GZip)
tpc.googlesyndication.com: 2 components, 28.9K (11.1K GZip)
maps.googleapis.com: 9 components, 462.3K (155.7K GZip)
maps.gstatic.com: 2 components, 229.8K (61.7K GZip)
khms1.googleapis.com: 1 component, 21.1K
smartarget.online: 2 components, 192.2K (109.4K GZip)ISSUE : Use cookie-free domains E-(50)
There are 10 components that are not cookie-freehttps://beingayogic.com/cdn-cgi/apps/head/96j3_XtycryQHYVxXr1gp4KjKOA.js
https://beingayogic.com/wp-content/cache/min/1/6c5833febd50f9e98ed28a332cfae451.css
https://ajax.cloudflare.com/cdn-cgi/scripts/7089c43e/cloudflare-static/rocket-loader.min.js
https://beingayogic.com/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js
https://beingayogic.com/cdn-cgi/apps/body/aXdPci71Ms_e-gcUCDrwAbd_We8.js
https://beingayogic.com/wp-content/cache/busting/google-tracking/ga-af5c617d36e28d19710b882a6824e213.js
https://beingayogic.com/wp-content/uploads/2019/08/image-8.png
https://beingayogic.com/wp-content/cache/busting/1/wp-includes/js/jquery/jquery-1.12.4-wp.js
https://beingayogic.com/wp-content/cache/min/1/22d14eabfcc0a3e6098c93ac87c8a3c7.js
https://beingayogic.com/wp-content/plugins/wp-rocket.3.5.1/assets/js/lazyload/12.0/lazyload.min.jsISSUE: Reduce the number of DOM elements D-(69)
There are 1623 DOM elements on the pageFILE : .HTACCESS
# BEGIN WP Rocket v3.4.4
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset UTF-8
# Force UTF-8 for a number of file formats
<IfModule mod_mime.c>
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
</IfModule>
# FileETag None is not enough for every server.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
# Since we’re sending far-future expires, we don’t need ETags for static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
<IfModule mod_alias.c>
<FilesMatch “\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$”>
<IfModule mod_headers.c>
Header set X-Powered-By “WP Rocket/3.4.4”
Header unset Pragma
Header append Cache-Control “public”
Header unset Last-Modified
</IfModule>
</FilesMatch>
<FilesMatch “\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$”>
<IfModule mod_headers.c>
Header unset Pragma
Header append Cache-Control “public”
</IfModule>
</FilesMatch>
</IfModule>
# Expires headers (for better cache control)
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault “access plus 1 month”
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest “access plus 0 seconds”
# Your document html
ExpiresByType text/html “access plus 0 seconds”
# Data
ExpiresByType text/xml “access plus 0 seconds”
ExpiresByType application/xml “access plus 0 seconds”
ExpiresByType application/json “access plus 0 seconds”
# Feed
ExpiresByType application/rss+xml “access plus 1 hour”
ExpiresByType application/atom+xml “access plus 1 hour”
# Favicon (cannot be renamed)
ExpiresByType image/x-icon “access plus 1 week”
# Media: images, video, audio
ExpiresByType image/gif “access plus 4 months”
ExpiresByType image/png “access plus 4 months”
ExpiresByType image/jpeg “access plus 4 months”
ExpiresByType image/webp “access plus 4 months”
ExpiresByType video/ogg “access plus 1 month”
ExpiresByType audio/ogg “access plus 1 month”
ExpiresByType video/mp4 “access plus 1 month”
ExpiresByType video/webm “access plus 1 month”
# HTC files (css3pie)
ExpiresByType text/x-component “access plus 1 month”
# Webfonts
ExpiresByType font/ttf “access plus 4 months”
ExpiresByType font/otf “access plus 4 months”
ExpiresByType font/woff “access plus 4 months”
ExpiresByType font/woff2 “access plus 4 months”
ExpiresByType image/svg+xml “access plus 1 month”
ExpiresByType application/vnd.ms-fontobject “access plus 1 month”
# CSS and JavaScript
ExpiresByType text/css “access plus 1 year”
ExpiresByType application/javascript “access plus 1 year”
</IfModule>
# Gzip compression
<IfModule mod_deflate.c>
# Active compression
SetOutputFilter DEFLATE
# Force deflate for mangled headers
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding
# Don’t compress images and other uncompressible content
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
</IfModule>
</IfModule>
# Compress all output labeled with one of the following MIME-types
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
</IfModule>
<IfModule mod_headers.c>
Header append Vary: Accept-Encoding
</IfModule>
</IfModule>
# END WP Rocket
# BEGIN LSCACHE
# END LSCACHE
# BEGIN NON_LSCACHE
# END NON_LSCACHE
# BEGIN HTTPS Redirection Plugin
# END HTTPS Redirection Plugin
# BEGIN WordPress
# The directives (lines) betweenBEGIN WordPress
andEND WordPress
are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# BEGIN WP Performance Score Booster Settings
# The directives (lines) betweenBEGIN WP Performance Score Booster Settings
andEND WP Performance Score Booster Settings
are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END WP Performance Score Booster Settings
# BEGIN Enable Gzip Compression
# The directives (lines) betweenBEGIN Enable Gzip Compression
andEND Enable Gzip Compression
are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
# END Enable Gzip Compression
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0
<FilesMatch “\.(txt|xml|js)$”>
ExpiresDefault A691200
</FilesMatch>
<FilesMatch “\.(css)$”>
ExpiresDefault A691200
</FilesMatch>
<FilesMatch “\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$”>
ExpiresDefault A691200
</FilesMatch>
<FilesMatch “\.(jpg|jpeg|png|gif|swf|webp)$”>
ExpiresDefault A691200
</FilesMatch>
</IfModule>
<IfModule mod_headers.c>
<FilesMatch “\.(txt|xml|js)$”>
Header set Cache-Control “max-age=691200”
</FilesMatch>
<FilesMatch “\.(css)$”>
Header set Cache-Control “max-age=691200”
</FilesMatch>
<FilesMatch “\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac)$”>
Header set Cache-Control “max-age=691200”
</FilesMatch>
<FilesMatch “\.(jpg|jpeg|png|gif|swf|webp)$”>
Header set Cache-Control “max-age=691200”
</FilesMatch>
</IfModule>hi no reply to my post above??
well, when you ask a question in an already closed topic then chances are no-one will see your question, as per the forum guidelines it is always better to start a new topic ??
regarding your question; (almost) all of the recommendations pertain to 3rd party hosted resources, which you cannot optimize, so nothing much you can do there I’m afraid.
Hi
I am facing same issue on GT matrixThere are 4 static components without a far-future expiration date.
https://www.wordtroupe.com/wp-content/cache/autoptimize/css/autoptimize_006b1c76fca896f7e17e663d3d9b9c20.css
https://www.wordtroupe.com/wp-content/cache/autoptimize/css/autoptimize_single_0f3c8abf28b586b035e2031ca146f61c.css?ver=1586451675
https://2.gravatar.com/avatar/?s=80&d=mm&r=g
https://www.wordtroupe.com/wp-content/cache/autoptimize/js/autoptimize_fe25c018df6cabda254bb340c5ddf3ae.jsas per the Forum FAQ please start your own topic rahultulsiani01 ??
- The topic ‘Autoptimize generating error in GTMetrix: Error: Add Expires headers’ is closed to new replies.