Tagged: x
-
AuthorPosts
-
August 30, 2016 at 7:56 am #1153257
newskywebsitesParticipantHi there,
I am trying to fix Add Expires Headers, Make Fewer HTTP Requests, Minify JS and CSS with htaccess rather than a plugin or CDN because I’ve tried and failed with this particular customer (can’t verify nameservers so no CDN). I can’t use Autoptimize plugin to optimize Javascript because it breaks the Essential Grid images and they don’t display.
I’m not familiar with htaccess, so I’ve read several posts from you guys and found different things to try pasting into htaccess file but they don’t seem to help when I re-run my site on GT Metrix. Can you look at what I have and let me know what should be in it’s place, please?
I’m hoping I can at least add expires headers and make fewer HTTP requests with htaccess?
Site is: http://rasevic.com/ (latest version of everything)
Current htaccess text is (added via Yoast file editor):
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault “access plus 5 seconds”
ExpiresByType image/x-icon “access plus 2592000 seconds”
ExpiresByType image/jpeg “access plus 2592000 seconds”
ExpiresByType image/png “access plus 2592000 seconds”
ExpiresByType image/gif “access plus 2592000 seconds”
ExpiresByType application/x-shockwave-flash “access plus 2592000 seconds”
ExpiresByType text/css “access plus 604800 seconds”
ExpiresByType text/javascript “access plus 216000 seconds”
ExpiresByType application/javascript “access plus 216000 seconds”
ExpiresByType application/x-javascript “access plus 216000 seconds”
ExpiresByType text/html “access plus 600 seconds”
ExpiresByType application/xhtml+xml “access plus 600 seconds”
</ifModule>
# END Expire headers## GZIP COMPRESSION ##
<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>
## GZIP COMPRESSION ### BEGIN WordPress
<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 WordPress
<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 WordPressTHANKS!
DawnAugust 30, 2016 at 7:59 am #1153269
newskywebsitesParticipantoh yeah, and I should mention I can’t use a caching plugin like W3 because it’s blacklisted by my WP Managed Hosting service (godaddy). Already read this link (https://community.theme.co/kb/performance/) and just about everything else on the forum about this… 🙂
Thank you!
DawnAugust 30, 2016 at 8:54 am #1153361
ChristianModeratorHey Dawn,
We’re sorry but we could not help with performance optimizations as those are outside the scope of our support. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/.
Thank you for understanding.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1153257 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
