Specifing Expiration Date For Static File's Caches

前端 未结 5 1103
春和景丽
春和景丽 2021-01-31 00:33

When i test my website for SpeedTest i\'m seeing a lot of expiration not specified error.You can see at this page .

I added this code to my .htaccess f

5条回答
  •  忘掉有多难
    2021-01-31 00:46

    I see you have PHP installed (reference wordpress), so we'll try to diagnose your problem:

    1. restart your apache web server. If you own the apache server (command line access), you can do it like such.
    2. create a phpinfo page. This will allow you to view the apache modules installed. Check for the mod_expires.c module your looking to use (should be able to do a CTL-F (find) request in your browser for mod_expires). If you find it - GOOD! If not, you need to install mod_expires in your apache server. If you own your apache server, you can search on for how to install modules for your specific operating system. If not, you can check with your hosting provider on how to get this module installed. Once installed, proceed.
    3. modify your http.conf entry to include "plus" in your expression
    4. restart Apache again
    5. Test =)

提交回复
热议问题