WordPress.org

Ready to get started?Download WordPress

Forums

add expire header using w3 total cache (5 posts)

  1. charlietech
    Member
    Posted 2 years ago #

    In the yslow, I have a F in this department. I have set my add expire header to 691200 but I still have an F what do I need to do to fix this?

  2. Brandon Kraft
    Happiness Engineer
    Posted 2 years ago #

    Have you tried to refresh the cache? Yslow may be pulling the cached files, which may lack headers.

  3. SNSD Photo
    Member
    Posted 2 years ago #

    you have 3rd party files in your site ?

    usually, even you already set the expires headers. it may still get "F" grade due 3rd party files.

  4. charlietech
    Member
    Posted 2 years ago #

    Yea I do, is there a way to set a header for them as well?

  5. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    add to top of .htaccess

    <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>

    you can change the time...

    This does not require a plugin to handle the expires headers (but use one for serving cached files and set the garbage collection to two weeks)

    Anytime you make site changes, force server cache to clear.

    Also, am not using a CDN.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.