minify kills load time yet boosts pagespeed score
-
I’ve recently started a website and soon after the installing of w3 I noticed that my page loading time was veryyyy long (16,9 sec), even though page score is quite ok (88%/GT Metrix).
The waterfall on GT metrix shows a lot of (separately loaded?) minified JS and CSS files that take a lot of loading time. I then tried to switch of Minify and this brought loading time to 3.3 sec, however, page size and number of requests went up and pagespeed score is then 30% ( It is now activated again but see below the details of results).
Is Minify suppose to increase page load time like this? And if not, how can I solve this?
Thanks for your help!
Myrthe, a WordPress and W3 newbie ??
PageSpeed Score
(30%)
YSlow Score
(52%)
Page Details
Fully Loaded Time
3.1s
Total Page Size
3.10MB
Requests
139The page I need help with: [log in to see the link]
-
Hello @kleinstukjedan
Thank you for your inquiry and I am happy to assist you with this.
I’ve tested your website on Gtmetrix and here are the results:https://gtmetrix.com/reports/paperlovestories.nl/S8ucfpcD
This means that you need to enable gzip compression and set expires header in Browser Cache settings.
Is Browser Cache enabled in Performance>General settings? If not, enable it, save all settings and go to Performance>Browser Cache and enable toe following in General sub-box:
Set expires header
Set cache control header
Set entity tag (ETag)
Enable HTTP (gzip) compression
Save all settings and purge the cache
Gzip compression will solve the Compression issue and with the settings above enabled you will also resolve the Leverage browser caching issue.
Thank you!Dear Marko,
Thank you so much for your response and advice.
I know the GT Metrix report suggests to fix compression and browser cache, however, this is the case with and without the Minify settings. What I’m trying to understand is why, with Minify switched on, the Fully loaded time is up to 17 seconds, while the page score, size and the number of request clearly benefit from Minify. What do you think?
Never the less, it would be great to fix the compression and caching issue as well. Especially for mobile it seems a big issue and I’ve tried to fixed that already without any results. All the settings you suggest were already enabled.
Just double checked to be absolutely sure:
– Browser cache is/was enabled in general settings
– all the suggested boxes in the browser cache section are checked as well (in addition, last-modified header and w3 total cache header are also enabled, is that an issue?)There is also all kinds of stuff added to .htcaccess to set compression/caching, see below, hope I’m not sharing anything secret. Is it possible perhaps hosting service settings overrule these settings or such?
Hope to hear from you again.
Regards,
Myrthe
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 1 month”
</IfModule>
## EXPIRES CACHING ##
# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
AddType text/css .css
AddType text/x-component .htc
AddType application/x-javascript .js
AddType application/javascript .js2
AddType text/javascript .js3
AddType text/x-js .js4
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType text/plain .txt
AddType text/xsd .xsd
AddType text/xsl .xsl
AddType text/xml .xml
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/vnd.ms-fontobject .eot
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 image/webp .webp
AddType application/json .json
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 video/webm .webm
AddType application/vnd.ms-project .mpp
AddType application/x-font-otf .otf
AddType application/vnd.ms-opentype ._otf
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 image/svg+xml .svg .svgz
AddType application/x-shockwave-flash .swf
AddType application/x-tar .tar
AddType image/tiff .tif .tiff
AddType application/x-font-ttf .ttf .ttc
AddType application/vnd.ms-opentype ._ttf
AddType audio/wav .wav
AddType audio/wma .wma
AddType application/vnd.ms-write .wri
AddType application/font-woff .woff
AddType application/font-woff2 .woff2
AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A604800
ExpiresByType text/x-component A604800
ExpiresByType application/x-javascript A604800
ExpiresByType application/javascript A604800
ExpiresByType text/javascript A604800
ExpiresByType text/x-js A604800
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType text/xml A3600
ExpiresByType video/asf A31536000
ExpiresByType video/avi A31536000
ExpiresByType image/bmp A31536000
ExpiresByType application/java A31536000
ExpiresByType video/divx A31536000
ExpiresByType application/msword A31536000
ExpiresByType application/vnd.ms-fontobject A31536000
ExpiresByType application/x-msdownload A31536000
ExpiresByType image/gif A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType image/webp A31536000
ExpiresByType application/json A31536000
ExpiresByType application/vnd.ms-access A31536000
ExpiresByType audio/midi A31536000
ExpiresByType video/quicktime A31536000
ExpiresByType audio/mpeg A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/mpeg A31536000
ExpiresByType video/webm A31536000
ExpiresByType application/vnd.ms-project A31536000
ExpiresByType application/x-font-otf A31536000
ExpiresByType application/vnd.ms-opentype A31536000
ExpiresByType application/vnd.oasis.opendocument.database A31536000
ExpiresByType application/vnd.oasis.opendocument.chart A31536000
ExpiresByType application/vnd.oasis.opendocument.formula A31536000
ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
ExpiresByType application/vnd.oasis.opendocument.text A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType application/pdf A31536000
ExpiresByType image/png A31536000
ExpiresByType application/vnd.ms-powerpoint A31536000
ExpiresByType audio/x-realaudio A31536000
ExpiresByType image/svg+xml A31536000
ExpiresByType application/x-shockwave-flash A31536000
ExpiresByType application/x-tar A31536000
ExpiresByType image/tiff A31536000
ExpiresByType application/x-font-ttf A31536000
ExpiresByType application/vnd.ms-opentype A31536000
ExpiresByType audio/wav A31536000
ExpiresByType audio/wma A31536000
ExpiresByType application/vnd.ms-write A31536000
ExpiresByType application/font-woff A31536000
ExpiresByType application/font-woff2 A31536000
ExpiresByType application/vnd.ms-excel A31536000
ExpiresByType application/zip A31536000
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
</IfModule>
</IfModule>
<FilesMatch “\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$”>
FileETag MTime Size
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public”
Header unset Set-Cookie
Header set X-Powered-By “W3 Total Cache/0.13.0”
</IfModule>
</FilesMatch>
<FilesMatch “\.(html|htm|rtf|rtx|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|TXT|XSD|XSL|XML)$”>
FileETag MTime Size
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public”
Header set X-Powered-By “W3 Total Cache/0.13.0”
</IfModule>
</FilesMatch>
<FilesMatch “\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|otf|_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|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|WEBP|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|WEBM|MPP|OTF|_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|_TTF|WAV|WMA|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW|ZIP)$”>
FileETag MTime Size
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public”
Header unset Set-Cookie
Header set X-Powered-By “W3 Total Cache/0.13.0”
</IfModule>
</FilesMatch>
<FilesMatch “\.(bmp|class|doc|docx|eot|exe|ico|json|mdb|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|JSON|MDB|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$”>
<IfModule mod_headers.c>
Header unset Last-Modified
</IfModule>
</FilesMatch>
<IfModule mod_headers.c>
Header set Referrer-Policy “no-referrer-when-downgrade”
</IfModule>
# END W3TC Browser Cache
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} =on
RewriteRule .* – [E=W3TC_SSL:_ssl]
RewriteCond %{SERVER_PORT} =443
RewriteRule .* – [E=W3TC_SSL:_ssl]
RewriteCond %{HTTP:X-Forwarded-Proto} =https [NC]
RewriteRule .* – [E=W3TC_SSL:_ssl]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* – [E=W3TC_ENC:_gzip]
RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
RewriteRule .* – [E=W3TC_PREVIEW:_preview]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =””
RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
RewriteCond %{REQUEST_URI} \/$
RewriteCond “%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” -f
RewriteRule .* “/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” [L]
</IfModule>
# END W3TC Page Cache core
# BEGIN WordPress
# De richtlijnen (regels) tussenBEGIN WordPress
andEND WordPress
worden
# dynamisch aangemaakt en zouden enkel aangepast mogen worden via WordPress filters.
# Elke wijziging aan deze richtlijnen tussen deze markeringen worden overschreven.
<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
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?paperlovestories.nl [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
RewriteRule \.(jpg|jpeg|png|gif|svg)$ https://dropbox.com/hotlink-placeholder.jpg [NC,R,L]# END WordPress
Hello @kleinstukjedan
Thank you for the information. It appears that you have some rules in your .htaccess file that are causing some conflict. Added manually or by some other plugin that should be handling expires and gzip. If you have such a plugins please disable them to avoid conflict. Make a backup of your .htaccess file, delete everything and add just the following rules:
# BEGIN W3TC Browser Cache <IfModule mod_mime.c> AddType text/css .css AddType text/x-component .htc AddType application/x-javascript .js AddType application/javascript .js2 AddType text/javascript .js3 AddType text/x-js .js4 AddType text/html .html .htm AddType text/richtext .rtf .rtx AddType text/plain .txt AddType text/xsd .xsd AddType text/xsl .xsl AddType text/xml .xml 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/vnd.ms-fontobject .eot 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 image/webp .webp AddType application/json .json 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 video/webm .webm AddType application/vnd.ms-project .mpp AddType application/x-font-otf .otf AddType application/vnd.ms-opentype ._otf 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 image/svg+xml .svg .svgz AddType application/x-shockwave-flash .swf AddType application/x-tar .tar AddType image/tiff .tif .tiff AddType application/x-font-ttf .ttf .ttc AddType application/vnd.ms-opentype ._ttf AddType audio/wav .wav AddType audio/wma .wma AddType application/vnd.ms-write .wri AddType application/font-woff .woff AddType application/font-woff2 .woff2 AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw AddType application/zip .zip </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/css A604800 ExpiresByType text/x-component A604800 ExpiresByType application/x-javascript A604800 ExpiresByType application/javascript A604800 ExpiresByType text/javascript A604800 ExpiresByType text/x-js A604800 ExpiresByType text/html A3600 ExpiresByType text/richtext A3600 ExpiresByType text/plain A3600 ExpiresByType text/xsd A3600 ExpiresByType text/xsl A3600 ExpiresByType text/xml A3600 ExpiresByType video/asf A31536000 ExpiresByType video/avi A31536000 ExpiresByType image/bmp A31536000 ExpiresByType application/java A31536000 ExpiresByType video/divx A31536000 ExpiresByType application/msword A31536000 ExpiresByType application/vnd.ms-fontobject A31536000 ExpiresByType application/x-msdownload A31536000 ExpiresByType image/gif A31536000 ExpiresByType application/x-gzip A31536000 ExpiresByType image/x-icon A31536000 ExpiresByType image/jpeg A31536000 ExpiresByType image/webp A31536000 ExpiresByType application/json A31536000 ExpiresByType application/vnd.ms-access A31536000 ExpiresByType audio/midi A31536000 ExpiresByType video/quicktime A31536000 ExpiresByType audio/mpeg A31536000 ExpiresByType video/mp4 A31536000 ExpiresByType video/mpeg A31536000 ExpiresByType video/webm A31536000 ExpiresByType application/vnd.ms-project A31536000 ExpiresByType application/x-font-otf A31536000 ExpiresByType application/vnd.ms-opentype A31536000 ExpiresByType application/vnd.oasis.opendocument.database A31536000 ExpiresByType application/vnd.oasis.opendocument.chart A31536000 ExpiresByType application/vnd.oasis.opendocument.formula A31536000 ExpiresByType application/vnd.oasis.opendocument.graphics A31536000 ExpiresByType application/vnd.oasis.opendocument.presentation A31536000 ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000 ExpiresByType application/vnd.oasis.opendocument.text A31536000 ExpiresByType audio/ogg A31536000 ExpiresByType application/pdf A31536000 ExpiresByType image/png A31536000 ExpiresByType application/vnd.ms-powerpoint A31536000 ExpiresByType audio/x-realaudio A31536000 ExpiresByType image/svg+xml A31536000 ExpiresByType application/x-shockwave-flash A31536000 ExpiresByType application/x-tar A31536000 ExpiresByType image/tiff A31536000 ExpiresByType application/x-font-ttf A31536000 ExpiresByType application/vnd.ms-opentype A31536000 ExpiresByType audio/wav A31536000 ExpiresByType audio/wma A31536000 ExpiresByType application/vnd.ms-write A31536000 ExpiresByType application/font-woff A31536000 ExpiresByType application/font-woff2 A31536000 ExpiresByType application/vnd.ms-excel A31536000 ExpiresByType application/zip A31536000 </IfModule> <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel <IfModule mod_mime.c> # DEFLATE by extension AddOutputFilter DEFLATE js css htm html xml </IfModule> </IfModule> <FilesMatch “\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$”> FileETag MTime Size <IfModule mod_headers.c> Header set Pragma “public” Header append Cache-Control “public” Header unset Set-Cookie Header set X-Powered-By “W3 Total Cache/0.13.0” </IfModule> </FilesMatch> <FilesMatch “\.(html|htm|rtf|rtx|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|TXT|XSD|XSL|XML)$”> FileETag MTime Size <IfModule mod_headers.c> Header set Pragma “public” Header append Cache-Control “public” Header set X-Powered-By “W3 Total Cache/0.13.0” </IfModule> </FilesMatch> <FilesMatch “\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|otf|_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|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|WEBP|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|WEBM|MPP|OTF|_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|_TTF|WAV|WMA|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW|ZIP)$”> FileETag MTime Size <IfModule mod_headers.c> Header set Pragma “public” Header append Cache-Control “public” Header unset Set-Cookie Header set X-Powered-By “W3 Total Cache/0.13.0” </IfModule> </FilesMatch> <FilesMatch “\.(bmp|class|doc|docx|eot|exe|ico|json|mdb|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|JSON|MDB|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$”> <IfModule mod_headers.c> Header unset Last-Modified </IfModule> </FilesMatch> <IfModule mod_headers.c> Header set Referrer-Policy “no-referrer-when-downgrade” </IfModule> # END W3TC Browser Cache # BEGIN W3TC Page Cache core <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTPS} =on RewriteRule .* – [E=W3TC_SSL:_ssl] RewriteCond %{SERVER_PORT} =443 RewriteRule .* – [E=W3TC_SSL:_ssl] RewriteCond %{HTTP:X-Forwarded-Proto} =https [NC] RewriteRule .* – [E=W3TC_SSL:_ssl] RewriteCond %{HTTP:Accept-Encoding} gzip RewriteRule .* – [E=W3TC_ENC:_gzip] RewriteCond %{HTTP_COOKIE} w3tc_preview [NC] RewriteRule .* – [E=W3TC_PREVIEW:_preview] RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} =”” RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC] RewriteCond %{REQUEST_URI} \/$ RewriteCond “%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” -f RewriteRule .* “/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” [L] </IfModule> # END W3TC Page Cache core # BEGIN WordPress # De richtlijnen (regels) tussen BEGIN WordPress and END WordPress worden # dynamisch aangemaakt en zouden enkel aangepast mogen worden via WordPress filters. # Elke wijziging aan deze richtlijnen tussen deze markeringen worden overschreven. <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
This will ensure that you only have your core WP rules and W3 Total Cache rules in your .htaccess file.
Thank you!Dear Marko,
Thank you for looking in to it. I’ve switched my .htcaccess rules for yours but it seems to make no difference… It looks like it only has problems with the compression and browser caching of the minified files, see below.. Maybe that is the reason that switching on/off minify impacts page score and page loading time that much?
What do you think?
Kind regards,
Myrthe
Enable compression for the following resources to reduce their transfer size by 1.9MiB (77% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/3861b.css could save 659.5KiB (85% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/d70fd.js could save 232.7KiB (70% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/b39d5.js could save 218.1KiB (72% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/83010.js could save 199.8KiB (74% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/d2f28.css could save 131.2KiB (84% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/f71f4.css could save 105.5KiB (86% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/78ce5.css could save 76.3KiB (83% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/92205.js could save 74.6KiB (65% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/9f110.js could save 68.5KiB (74% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/94a72.js could save 60.7KiB (73% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/00792.js could save 35.0KiB (70% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/dd3df.js could save 33.2KiB (65% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/9f960.js could save 18.5KiB (69% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/4dd70.js could save 11.2KiB (71% reduction).
Compressing https://paperlovestories.nl/wp-includes/js/wp-emoji-release.min.js?ver=5.3.2 could save 9.0KiB (66% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/dfacc.js could save 4.5KiB (55% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/24ccf.js could save 3.9KiB (66% reduction).
Compressing https://paperlovestories.nl/wp-content/plugins/w3-total-cache/pub/js/lazyload.min.js could save 3.8KiB (62% reduction).
Compressing https://paperlovestories.nl/wp-content/cache/minify/2edfd.css could save 2.2KiB (64% reduction).Leverage browser caching for the following cacheable resources:
https://paperlovestories.nl/wp-content/cache/minify/00792.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/24ccf.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/2edfd.css (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/3861b.css (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/4dd70.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/78ce5.css (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/83010.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/92205.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/94a72.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/9f110.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/9f960.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/b39d5.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/d2f28.css (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/d70fd.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/dd3df.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/dfacc.js (expiration not specified)
https://paperlovestories.nl/wp-content/cache/minify/f71f4.css (expiration not specified)
https://paperlovestories.nl/wp-content/plugins/w3-total-cache/pub/js/lazyload.min.js (expiration not specified)
https://paperlovestories.nl/wp-content/uploads/2019/01/cropped-logomettekst-1-32×32.png (expiration not specified)
https://paperlovestories.nl/wp-content/uploads/2019/01/cropped-logomettekst.png (expiration not specified)
https://paperlovestories.nl/wp-content/uploads/2020/02/DSC_1388.jpg (expiration not specified)
https://chimpstatic.com/mcjs-connected/js/users/2b78d22cc43381542b9e282ff/d7b89c1b5f0f663ff90203996.js?ver=2.3.1 (28 minutes 40 seconds)
https://www.google-analytics.com/analytics.js (2 hours)Hello @kleinstukjedan
It appears that your website is on nginx+apache and in your environment, those files are handled by nginx while PHP by apache. i.e. apache rules don’t have a chance to act.
What you need to do is to add rules to nginx.conf in the root of your server. If you are not comfortable doing this by yourself, please reach out to your host for assistance.
Thank you!Dear Marko,
thank you for your advise. My Host added some things and the compression seems to be solved. However browser caching still seems an issue. Any idea what to add to nginx.conf to solve that?
Kind regards,
Myrthe
Hello @kleinstukjedan
nginx rules for gzipping js and CSS files need to be added.
Something like this:gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_proxied any; gzip_buffers 16 8k; gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css; gzip_vary on;
Please note that this rule is for js and CSS files so if you already have these rules you need to add gzip_types
Thank you!
- The topic ‘minify kills load time yet boosts pagespeed score’ is closed to new replies.