WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Page Speed FF plugin suggestions, how to (12 posts)

  1. utnalove
    Member
    Posted 2 years ago #

    Hello, in the Google Page Speed plugin for Firefox I have a red mark for:

    Leverage browser caching, and
    Enable compression

    In Leverage browser caching I see almost everywhere:
    (expiration not specified)
    And I see also the following files:
    http://connect.facebook.net/pl_PL/all.js (16 minutes 55 seconds)
    http://pagead2.googlesyndication.com/pagead/show_ads.js (1 hour)
    http://feeds.feedburner.com/~fc/sitename?bg=FF9900&fg=000000&anim=1 (2 hours)
    http://www.google-analytics.com/ga.js (2 hours)

    And I see another important line:
    Compressing http://mysite.com/ could save 40.3KiB (78% reduction)

    In Enable compression I see the following:
    many .js files of the theme and plugins

    In W3TC I have enabled:
    Page Cache
    Minify
    Database Cache
    Object Cache

    What should I do to enhance the caching of those files?

  2. tgeorge
    Member
    Posted 2 years ago #

    In Leverage browser caching I see almost everywhere:
    (expiration not specified)

    In the General tab of W3TC, enable the "Browser Cache" option. Then in the Browser Cache tab of W3TC, enable all the "Set expires header" options.

    And I see another important line:
    Compressing http://mysite.com/ could save 40.3KiB (78% reduction)

    In Enable compression I see the following:
    many .js files of the theme and plugins

    The "Browser Cache" option should solve this problem too. In the Browser Cache tab of W3TC, there is a "Enable HTTP (gzip) compression" option, which is on by default. (If it's off, then turn it on.)

  3. utnalove
    Member
    Posted 2 years ago #

    I did it. Nothing changed:

    (expiration not specified) is still appearing. May be useful to know that the files with (expiration not specified) are all jpg, png, js.

    Other file still need to be compressed:
    (for example)Compressing http://mysite.com/wp-includes/js/jquery/jquery.js?ver=1.6.1 could save 58.0KiB (64% reduction).

    What can I do?

  4. tgeorge
    Member
    Posted 2 years ago #

    (expiration not specified) is still appearing. May be useful to know that the files with (expiration not specified) are all jpg, png

    The "Browser Cache" tab contains mutiple sections and multiple "Set expires header" checkboxes. The checkbox relevant to JPG and PNG files is under the "Media & Other Files" section. Is this checkbox checked ? If it is, then try checking also "Set cache control header" and set the "Cache Control policy" to "cache with max-age".

    Note that the "Browser Cache" settings affect only files hosted on your own server: they cannot affect external JPG and PNG files.

  5. utnalove
    Member
    Posted 2 years ago #

    Almost all the files are hosted in my server.
    All the "Set expires header" in the "Browser Cache" tab are selected.
    In the CSS & JS section I set the "Set cache control header" and set the "Cache Control policy" to "cache with max-age".

    However even after deleting the browser cache and refreshing the site many times, still nothing changed.
    You can try opening this site with FF and run the pagespeed analysis.

    What do you suggest?

  6. tgeorge
    Member
    Posted 2 years ago #

    I was talking about the "Media & Other Files" section, not the "CSS & JS section".

  7. utnalove
    Member
    Posted 2 years ago #

    oops - correcrted, but still the same :(

  8. tgeorge
    Member
    Posted 2 years ago #

    Hmm... It should work. I have exactly the same "Browser Cache" settings on my site, and I get no Google Page Speed errors. This maybe means that your host does not support mod_expires. I know almost nothing about modules, but here is a description :

    "mod_expires module is responsible for setting of the Expires HTTP header and max-age directive of Cache-Control HTTP header in server responses."

    Maybe you could ask your host whether mod_expires is supported. Sorry, you've hit a new wall.

  9. utnalove
    Member
    Posted 2 years ago #

    hehe, thank I will let you know

  10. utnalove
    Member
    Posted 2 years ago #

    They told me that it is possible to use the "Expire" command in the .htaccess. It is possible to use a combination of ':Location' and'Expire'

    The Expire format is the following:
    Expire code_Seconds

    Example 1:

    :Location *.(gif|jpg)
    Expires A3600

    Example 2:

    :Location ${HTTP_USER_AGENT} =~ Mozilla
    Expires A86400

    Does it resolve the problem or they answered something else not related?

  11. tgeorge
    Member
    Posted 2 years ago #

    Unfortunately, it means that mod_expires is not supported. The three directives used by mod_expires are :

    • ExpiresActive
    • ExpiresByType
    • ExpiresDefault

    See http://askapache.info/1.3/mod/mod_expires.html

    Those three directives are a more advanced and more evolved way to generate the "Expires" header (which belongs to the elementary mod_headers). I found a post, where someone asked Frederick Townes (the developer of W3TC) :

    "Would it be possible to get rid of mod_expires? mod_headers does the same thing and is used anyways. I am probably not the only one with a default installation of Apache2 and no way of changing it."

    And Frederick Townes replied :

    "The way the plugin works, if the modules do not exist then the directives are not used. I'm also using the modules as intended without hacks to ensure the maximum interoperability for users with hosts with full featured software."

    So apparently you have to forget about Browser Cache using W3TC on your current host.

  12. utnalove
    Member
    Posted 2 years ago #

    eh :(

    I see :( I think I will continue using it without the Browser Cache :/

    Thank you very much for your help!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic