Tagged: Browser Cache
-
AuthorPosts
-
July 15, 2022 at 10:04 am #55273Shriram MGuest
Hi, My website was hosted in AWS Lightsail. No CDN was used. I try to optimize my website using W3 total cache but in gtmetrix it still shows
“Serve static assets with an efficient cache policy”.
Since My site was hosted by AWS Lightsail it is not having a .htaccess file. It may be a issue?
How to rectify this to add “CACHE TTL” for resourcesGTMETRIX : https://ibb.co/RQHGwSc
My Settings : https://ibb.co/Tv3cSGnJuly 15, 2022 at 10:17 am #55300Marko VasiljevicKeymasterHello,
Thank you for reaching out and I am happy to assist you with this.
I’ve checked the website and I can see that the cache-control and expires header are not enabled for static files.
Thank you for sharing the screenshot, however, it only shows that the Browser Cache is enabled in the W3 Total Cache – General settings, and this needs to be fine-tuned.
Can you please go to Performane>Browser Cache, and make sure that the “Set expires header” and “Set cache control header” are enabled in the General box including the sub-boxes (HTML&XMK, CSS&JS, Media&other files). Once enabled, save all settings and purge the cache and see if hose headed are added for static files.Thanks!
July 18, 2022 at 6:21 am #55316Shriram MGuestThanks For the Reply
I did the settings you mentioned and clear all cache but nothing happens still the error in Gtmetrix shownWebsite/Browser Cache Settings : https://prnt.sc/T9eYcZzDEifN
GTMetrix Report : https://prnt.sc/L1xR3-Lr-Z4M
Note : My Website was hosted in AWS-Lightsail and obviously it doesn’t have .htaccess file. So for my knowledge cache plugins was edit .htaccess put some code right? but here no .htaccess so is there any issue?
July 18, 2022 at 6:25 am #55344Marko VasiljevicKeymasterHello,
Thank you for your feedback.
As I can see the website is hosted on Bitnami.
By default, .htaccess files are disabled due to security and performance reasons (their words).The .htaccess files content is moved to a file called htaccess.conf in the folder /opt/bitnami/apps/APPNAME/conf. You can check more about it at https://docs.bitnami.com/aws/infrastructure/lamp/administration/use-htaccess/.
In this link, you can also find a video tutorial that is using W3 Total Cache rules as an example.
Thanks! -
AuthorPosts
- The topic ‘Issue with AWS Lightsail Cache’ is closed to new replies.