Tagged: x
-
AuthorPosts
-
March 6, 2017 at 1:16 pm #1396669
AnnParticipantHey there,
This might be out of the scope of your support and if it is – that’s totally fine! Thought I’d ask at least 🙂
I followed the instructions describer here https://community.theme.co/kb/performance/ to optimize my sites performance. And I added the code below to my .htaccess file:
<IfModule mod_deflate.c>
# Force compression for mangled headers.
# http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
<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
</IfModule>
</IfModule># Compress all output labeled with one of the following MIME-types
# (for Apache versions below 2.3.7, you don’t need to enablemod_filter
# and can remove the<IfModule mod_filter.c>and</IfModule>lines
# asAddOutputFilterByTypeis still in the core directives).
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/ld+json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/x-web-app-manifest+json \
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>
If I add the code below to the .htaccess to enable browser caching, could that cause a conflict?
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access plus 1 year”
ExpiresByType image/jpeg “access plus 1 year”
ExpiresByType image/gif “access plus 1 year”
ExpiresByType image/png “access plus 1 year”
ExpiresByType text/css “access plus 1 month”
ExpiresByType application/pdf “access plus 1 month”
ExpiresByType text/x-javascript “access plus 1 month”
ExpiresByType application/x-shockwave-flash “access plus 1 month”
ExpiresByType image/x-icon “access plus 1 year”
ExpiresDefault “access plus 2 days”
</IfModule>
## EXPIRES CACHING ##Thanks!
Ann
March 6, 2017 at 2:25 pm #1396732
DarshanaModeratorHi Ann,
You can add if required. Please check the following resource (http://softstribe.com/wordpress/how-to-add-expires-headers-in-wordpress/).
Thanks!
March 6, 2017 at 5:30 pm #1396922
AnnParticipantGreat!
Added the code and works perfect and really improved the speed 🙂
Thanks again!
March 7, 2017 at 12:56 am #1397285
FriechModeratorYou’re more than welcome, glad we could help.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1396669 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
