Tagged: x
-
AuthorPosts
-
July 18, 2016 at 12:03 pm #1092124
EricParticipantHey I just have a few questions about optimizing my site. At this point I’ve already consulted and implemented the recommendations within this article (https://community.theme.co/kb/performance/), which has certainly helped, however there’s some issues that I can’t quite figure out. The first issue is that on my Gmetrix test, I’m still receiving a 0 where it says ‘add expires headers’. The first thing I did was consult the forum and I did find this link (https://community.theme.co/forums/topic/page-speed-problems-related-to-x-theme-add-expires-headers-cdn/), which addressed the issue directly. And what they recommended was that I add this code (shown below) into the .htaccess file located at the root directory of my site, which I have already done.
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault “access plus 1 month”
# My favicon
ExpiresByType image/x-icon “access plus 1 year”
# Images
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
# CSS
ExpiresByType text/css “access plus 1 month”
# Javascript
ExpiresByType application/javascript “access plus 1 year”
</IfModule>However afterwards when I tested my website on Gmetrix.com, the results were the same as I was still receiving a 0 in ‘Add Expires headers’, as well as a 0 in ‘Make fewer HTTP requests’. Now just for the sake of being thorough I also tried adding this code as well (at different times), which was found online:
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType text/css “access plus 60 days”
ExpiresByType text/javascript “access plus 60 days”
ExpiresByType image/ico “access plus 60 days”
ExpiresByType image/jpg “access plus 60 days”
ExpiresByType image/jpeg “access plus 60 days”
ExpiresByType image/gif “access plus 60 days”
ExpiresByType image/png “access plus 60 days”
ExpiresByType text/css “access plus 60 days”
ExpiresByType text/html “access plus 60 days”
</IfModule>However in both cases the results remained the same, with no discernible improvements. So with all that being said I just have a few questions.
#1 – With regards to the ‘add expires headers’ issue, is there anything else I have to do to have the code (listed above) taking effect? And if not, is there something else that I’m supposed to be doing within W3 Total cache, which I know also handles the expire-header? I know there’s also a plugin called ‘WP Far Future Expiration Plugin’ which could help with the issue but I’m trying to keep plugins to a minimum so any advice on how to fix this problem without an extra plugin would be idea.
#2 – With regards to reducing the number of HTTP requests, is that something that would be solved by fixing the ‘expires headers’ issue, or is that something that would have to be solved separately? I’ve read somewhere that this issue can be solved using w3 total cache’s minify feature, however at the moment I’m minifying with cloudflare, and despite that the issue has still remained.
#3 – On GMetrix I’m also receiving a 0 rating for ‘cookie-free domains’, but I’ve been told that there’s no need to set up cookie-free domains if you’re using cloudflare. However I’ve also read that doing so could eliminate my HTTP requests, and so I just wanted to know if that could be a contributing factor with regards to my http requests issue, or can this issue simply be ignored?
# 4 – And finally I’ve been told that I shouldn’t be caching my website while I’m still developing my website, so once these issues are resolved, would you recommend that I deactivate W3 Total cache until I’m finished? Or is there no harm in keeping it activated so long as I keep clearing the cache.
Thanks again for all your great help.
July 18, 2016 at 12:05 pm #1092130
EricParticipantThis reply has been marked as private.July 19, 2016 at 3:34 am #1093130
RadModeratorHi there,
Thanks for writing in.
I like to help but this seems between Gmetrix and your caching plugin. In Google page insight, your site score is 91 which is quite high. There is no issue with header expiration and other stuff. I think you should contact Gmetrix as they may seeing your site different than google does. We are only limited to X and cornerstone related issues.
Thanks for understanding.
July 19, 2016 at 8:20 am #1093448
EricParticipantHey sorry but you tested my website with ‘maintenance mode’ on, which is why you got the 91. If you were to remove it and test it again you’d see that my actual grade was 64 with a number of issues popping up. I know I’ve seen other threads that dealt with similar questions so if you could take a second look after deactivating maintenance mode it would certainly be appreciated.
All four questions that I laid out were extensively researched before I asked and unfortunately I haven’t been able to find solutions, so at this point I really need your help. Once again I’m sorry for the confusion but any help with regards to the four questions would be greatly appreciated.
July 19, 2016 at 8:37 am #1093473
EricParticipantThis reply has been marked as private.July 19, 2016 at 8:53 am #1093501
LelyModeratorHi Eric,
It’s good when I check again. See attached screenshot.
July 19, 2016 at 9:21 am #1093571
EricParticipantHey thanks for the quick reply.
Well on my end my mobile score is always in the 60s and my desktop numbers are usually in the 70s (see attachments). However to be honest I’m less concerned about these numbers than I am the error messages that popped up on GTMetrix. I’ve seen other threads within the forum where people received guidance about how to fix certain issues that can pop up on their speed test and in this case the code mentioned above (which I already added to my .htaccess file) was directly taken from an x theme forum topic. So I was just hoping to get some advice with regards to the four questions, just to make sure the code that was added to my .htaccess file is actually doing something and to make sure that the other issues won’t become a problem once my website is up and running. Again sorry if I was unclear originally, I just found a lot of other topics that raised similar questions and so I didn’t think it would be a problem. Any help with regards to the initial questions would be greatly appreciated.
Thanks
July 20, 2016 at 12:57 am #1094817
RadModeratorHi there,
Would you mind providing the threads related to this, we can use that as the reference. For the meantime, I’ll provide the answers for your questions.
1. It should work, what I’m not sure is why GMetrix isn’t able to detect the expiration date. For example, please check the attached file and it’s correctly displaying the expiration to
Expires:Thu, 20 Jul 2017 05:43:32 GMTWhich is 1 year from current access, and that means it is working. I also checked it with Google page insights and there are no problem with expiration. There are two files without expiration, but those files aren’t located or stored on your site. For examples,
http://s.gravatar.com/js/gprofiles.js
https://maps.googleapis.com/maps/api/jsYour site’s score is slow is not because of expiration, it’s because of render blocking, image optimization, and tap areas are overlapping ( more related to your slider layers )
2. It’s not related to expiration, it’s more on your cache plugin, it has the ability to minified the files and compiled them in single file to reduce connections. Please check your cache plugin’s minification feature.
3. According to here https://gtmetrix.com/use-cookie-free-domains.html, you should host your static files outside your site to avoid unnecessary cookie traffic. Hence, yes, hosting it with CDN or CloudFlare should fix that. Your cache plugin has CDN feature too, but it’s up to you which service you’ll use.
4. Cache causes a lot of troubles during development, hence, we recommend it once your site is done, or even just updating your site. Some hosting has double layered of caching, and some users complain that the theme and script are faulty, but it’s due to cache.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1092124 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
