WordPress.org

Ready to get started?Download WordPress

Forums

Leverage Browser Caching question (14 posts)

  1. borderline11
    Member
    Posted 2 years ago #

    google speed test tell me to Leverage Browser Caching .
    I understand this is for images, css, java and that the expiry dates should be set up to a year.
    Say that I need to edit my css files or change an image, what's gonna happened if I have the Leverage Browser Caching set up? Nobody will be able to see the changes after the expiry dates?
    sorry if this is a dumb question but Im new to WP

  2. You should definitely use a caching plugin; most WordPress sites benefit from caching, except for a few special cases. We use this one on client sites all the time, and it is very well respected.
    W3 Total Cache

    You can also search the word "cache" in the plugins directory (Plugins>Add New) as there are several others as well.

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

    No. Browser caching is not the same as server caching. What this tells a browser is that this file is good to load from a local browser cache for or until x time unless the file has changed on the server (when done right). Disregard as long as you have allowed browser caching of some form as when not that means each time a visitor returns, loads multiple pages or posts each part of site has to be sent to the browser. This is an important site performance item. Your web assets should have time tags that the browser compares, which means any site (static file) changes then get the 200 OK for dynamic content, 200 OK for modified content, and 304 which is 'load from local cache' for not modified static content. Note many wordpress sites load poorly due this being done wrong or having too much dynamic content per page. The WordPress "loop" is dynamic, but much of many sites is static especially external css and js files, header images, sidebar content, footer content etc.

  4. By the way, this is not the same as leveraging browser caching, but the above mentioned plugin should help improve your score considerably.

  5. Yes, I understand that, and know the difference; even "static" pages require database calls in the absence of server-side cacheing. A good WP caching plugin improves your site performance overall.

    If you're comfortable editing .htaccess yourself, you can add your own expires to leverage browser caching. Here's a good primer on the subject: http://thomasgriffinmedia.com/blog/2010/11/how-to-leverage-browser-caching-in-wordpress-via-htaccess/

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

    I was sending my reply to the OP (and not you) and coincidentally as you made your post.

  7. borderline11
    Member
    Posted 2 years ago #

    I'm already using a caching plugin, Quick Cache.
    Thanks JerrySarcastic, I saw your link, thanks

    SwansonPhotos, you are saying that it doesn't matter the length of the expiry date I set on the htacces file , if I update a picture or a css file, the browser will show the updated file, right?

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

    It will unless you are using a server caching plugin that for example serves cached html pages...it's a trade off, server performance, visitor browser load times, content update schedule...

    Most caching plugins let you clear the cache and additionally set some options for what is cached and for how long it is cached. Again, these are set based on site cotent, web server performance, # of hits on site, content update interval....etc..

  9. Sorry SwansonPhotos... your favicons looked so similar I thought I was speaking to the same person. Keep on rocking! :)

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

    LOL, I love my Gravatar!

  11. Lol I meant Gravatar... damned Mondays.

  12. borderline11
    Member
    Posted 2 years ago #

    I have the expiration time on Quick Cache files to 3600 seconds... I don't know if this wold interfere with the Leverage browser settings

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

    It means that plugin will cache content for serving to a browser for that time period...and the best way to test all this is to go back use the tools you started with...follow up with the documentation links, review in the appropriate forums and ask for advice from webhost or others on this.

  14. triamazikamno
    Member
    Posted 2 years ago #

    If you don't use W3 Total Cache plugin, the best way to enable the browser caching is to edit .htaccess. Check an example at http://howtounix.info/howto/How-to-Leverage-browser-caching. It also explains how to disable ETags (YSlow doesn't like them).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.