Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #55273
    Shriram M
    Guest

    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 resources

    GTMETRIX : https://ibb.co/RQHGwSc
    My Settings : https://ibb.co/Tv3cSGn

    #55300
    Marko Vasiljevic
    Keymaster

    Hello,

    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!

    #55316
    Shriram M
    Guest

    Thanks For the Reply
    I did the settings you mentioned and clear all cache but nothing happens still the error in Gtmetrix shown

    Website/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?

    #55344
    Marko Vasiljevic
    Keymaster

    Hello,

    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!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Issue with AWS Lightsail Cache’ is closed to new replies.