• Resolved hughforsyth

    (@hughforsyth)


    Hi Frank,

    I’ve got a small compatibility issue with SuperCache. Is there any way to specify a different directory for the cache files?

    I recently updated to 1.70 and enabled the “Save aggregated script/css as static files” which I really like? I’ve now switched this off.

    The problem is that the max age was being set to 3 seconds. This ws being set by Supercache which adds the following .htaccess file to /wp-content/cache/ directory (and therefore /wp-content/cache/autoptimize).

    # BEGIN supercache
    <IfModule mod_mime.c>
    <FilesMatch “\.html\.gz$”>
    ForceType text/html
    FileETag None
    </FilesMatch>
    AddEncoding gzip .gz
    AddType text/html .gz
    </IfModule>
    <IfModule mod_deflate.c>
    SetEnvIfNoCase Request_URI \.gz$ no-gzip
    </IfModule>
    <IfModule mod_headers.c>
    Header set Vary “Accept-Encoding, Cookie”
    Header set Cache-Control ‘max-age=3, must-revalidate’
    </IfModule>
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html A3
    </IfModule>

    # END supercache

    It’s not a fault with your plugin and maybe SuperCache should put the .htaccess in /wp-content/cache/supercache/. But an easy fix would be for me to move the Autoptimize folder to /public_html/wp-content/autoptimize.

    I’ve tried worked around this by adding a .htaccess file to /public_html/wp-content/cache/autoptimize. This worked but got deleted whenever I purged the Autoptimize cache.

    I’ve now switched back to dynamic but it would be nice to switch it back on..

    Thank you for your plugin. It’s great and the only minify I’ve ever been able to get to work well.

    The site is https://www.unitedworldschools.org/

    Thanks

    https://www.ads-software.com/plugins/autoptimize/

Viewing 15 replies - 31 through 45 (of 86 total)
  • I see…that is embarrassing.
    Anyhow, the test on red bothttps://redbot.org/?uri=http%3A%2F%2Fvillasdiani.com is
    The response body is different when content negotiation happens.
    The resource last changed 50 min 43 sec ago.
    This response cannot be served by a cache once it becomes stale.

    I do not think is correct:-(

    Plugin Author Frank Goossens

    (@futtta)

    it is, the redbot-remark about cache is about caching in the browser (what they mean is; once the browse cache for this object becomes stale, the browser is not allowed to use it again, which is normal) and not about caching on the server by wp super cache.

    you really can stop worrying and enjoy your fast site (and the diani beach)! ??

    You are amazing Futta!Thank you so much!

    Futta I hope you slept well, I swear this is the last question! Is also normal that in the webpage test are 304 responses:https://www.webpagetest.org/result/131102_4Q_8JB/

    Detail:
    URL: https://villasdiani.com/wp-content/cache/autoptimize/autoptimize_498bfb2de4d47c00d3dca0a6b99f6a58.php
    Host: villasdiani.com
    IP: 192.185.16.107
    Location: United States
    Error/Status Code: 304
    Client Port: 2832
    Start Offset: 0.150 s
    DNS Lookup: 0 ms
    Initial Connection: 0 ms
    SSL Negotiation: 0 ms
    Time to First Byte: 410 ms
    Content Download: 0 ms
    Bytes In (downloaded): 0.2 KB
    Bytes Out (uploaded): 0.7 KB

    Response:
    HTTP/1.1 304 Not Modified
    Date: Sat, 02 Nov 2013 06:24:52 GMT
    Server: Apache
    Connection: close
    Expires: Mon, 04 Nov 2013 06:24:52 GMT
    Cache-Control: max-age=3600, must-revalidate
    Vary: Accept-Encoding,Cookie
    Cached Response Headers:
    HTTP/1.1 200 OK
    Vary:Cookie
    ETag: 5b7ea5202ed471c15c97510f4751b4e9
    Keep-Alive: timeout=5, max=74
    Content-Type: text/css; charset=utf-8
    Content-Length: 35430
    Expires: Sat, 02 Nov 2013 07:24:40 GMT
    Last-Modified: Fri, 01 Nov 2013 11:39:45 GMT

    Plugin Author Frank Goossens

    (@futtta)

    morning july ??

    this one is browser caching related; a browser should, based on internal logic and on information from the previous time the resource was loaded, decide if that resource has to be re-requested. if the browser does and the resource did not change, the server will just respond with a simple “use your cache, it did not change” or in HTTP-lingo; 304. so a 304 is pretty efficient, really ??

    Morning Futta:-)thank you so much,I was realy afraid you will not write me anymore.

    but is also configuration good if in the leverage browser cache it reports me there also my site villas diani?(I did not know it is static)I mean I would expect there all that gravatar and whatever but not the site(as it has there something set for 3 seconds I am afraid it still have some problem from that Expires/Max Age i was changing)

    FAILED – (No max-age or expires) – https://s.gravatar.com/css/services.css?ver=2013Novaa
    FAILED – (No max-age or expires) – https://platform.linkedin.com/js/nonSecureAnonymousFramework?v=0.0.1196-RC1.31073-1408&amp;
    FAILED – (No max-age or expires) – https://ssl.gstatic.com/accounts/o/868078097-postmessagerelay.js
    FAILED – (No max-age or expires) – https://log.pinterest.com/?via=http%3A%2F%2Fvillasdiani.com%2F&guid=hHmnsNLFyrZD&type=pidget&callback=PIN_1383373464560.f.callback%5B0%5D
    FAILED – (No max-age or expires) – https://s.gravatar.com/css/hovercard.css?ver=2013Novaa
    FAILED – (No max-age or expires) – https://apis.google.com/js/plusone.js
    FAILED – (No max-age or expires) – https://maps.gstatic.com/cat_js/intl/en_us/mapfiles/api-3/14/11/%7Bcommon,util,stats%7D.js
    FAILED – (No max-age or expires) – https://stats.wordpress.com/g.gif?host=villasdiani.com&rand=0.5284803932260369&v=ext&j=1%3A2.5&blog=22614926&post=0&tz=3&ref=
    FAILED – (No max-age or expires) – https://maps.gstatic.com/intl/en_us/mapfiles/api-3/14/11/main.js
    FAILED – (No max-age or expires) – https://s.gravatar.com/js/gprofiles.js?ver=2013Novaa
    FAILED – (3 seconds) – https://villasdiani.com/
    FAILED – (5.0 minutes) – https://assets.pinterest.com/js/pinit.js
    FAILED – (20.0 minutes) – https://connect.facebook.net/en_US/all.js
    FAILED – (30.0 minutes) – https://platform.twitter.com/widgets.js
    FAILED – (30.0 minutes) – https://maps.google.com/maps/api/js?sensor=false&ver=3.0
    WARNING – (60.0 minutes) – https://oauth.googleusercontent.com/gadgets/js/core:rpc:shindig.random:shindig.sha1.js?c=2
    WARNING – (2.0 hours) – https://platform.stumbleupon.com/1/widgets.js
    WARNING – (10.3 hours) – https://platform.linkedin.com/in.js
    WARNING – (12.0 hours) – https://www.google-analytics.com/ga.js
    WARNING – (24.0 hours) – https://accounts.google.com/o/oauth2/postmessageRelay?parent=http%3A%2F%2Fvillasdiani.com

    Plugin Author Frank Goossens

    (@futtta)

    well, those are all external resources, so you have no impact on the cache headers that are sent along by the servers which those resources come from.

    but is that not weird there is my site? I thought I have set something wrong on the wp super cache or autoptimize. Or I should ignore it.

    Plugin Author Frank Goossens

    (@futtta)

    nah, these requests to external resources are initiated on your site (in the html/js). so it’s normal they’re in the report, but you can’t change how they are handled on the external servers (google, gravatar, pinterest, twitter, facebook, …).

    Plugin Author Frank Goossens

    (@futtta)

    hughforsyth, hamed.t; I’ve just pushed out a preview of 1.7.1 which writes an .htaccess in the cache/autoptimize/ folder to override the wp super cache one. Would be great if you could give that new version a test-spin; https://downloads.www.ads-software.com/plugin/autoptimize.zip

    frank

    Thank you very much Frank! I did not see your reply before, I am not good in forums:-)

    Thread Starter hughforsyth

    (@hughforsyth)

    Apologies Frank but I didn’t get to test this last weekend but I’ve just installed the official update to 1.7.1 and it is working well.

    Thanks for the hard work. It’s really helped and is appreciated.

    Hugh

    Hallo Frank, I am totally desperate:-( I see this errors in cpanel

    [07-Nov-2013 13:00:10] PHP Warning:  file_put_contents(/home2/damian/public_html/villasdiani.com/wp-content/cache/autoptimize/autoptimize_dc2d5148336040f17a7ccfa0dd44be29.php) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No such file or directory in /home2/damian/public_html/villasdiani.com/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 52
    [07-Nov-2013 13:00:10] PHP Warning:  file_put_contents(/home2/damian/public_html/villasdiani.com/wp-content/cache/autoptimize/autoptimize_dc2d5148336040f17a7ccfa0dd44be29.php.none) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No such file or directory in /home2/damian/public_html/villasdiani.com/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 53
    [07-Nov-2013 13:00:12] PHP Warning:  file_put_contents(/home2/damian/public_html/villasdiani.com/wp-content/cache/autoptimize/autoptimize_498bfb2de4d47c00d3dca0a6b99f6a58.php) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No such file or directory in /home2/damian/public_html/villasdiani.com/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 52
    [07-Nov-2013 13:00:12] PHP Warning:  file_put_contents(/home2/damian/public_html/villasdiani.com/wp-content/cache/autoptimize/autoptimize_498bfb2de4d47c00d3dca0a6b99f6a58.php.none) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No such file or directory in /home2/damian/public_html/villasdiani.com/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 53
    [07-Nov-2013 13:00:12] PHP Warning:  file_put_contents(/home2/damian/public_html/villasdiani.com/wp-content/cache/autoptimize/autoptimize_1ce815464f0cb9325573df64bee34583.php) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No such file or directory in /home2/damian/public_html/villasdiani.com/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 52
    [07-Nov-2013 13:00:12] PHP Warning:  file_put_contents(/home2/damian/public_html/villasdiani.com/wp-content/cache/autoptimize/autoptimize_1ce815464f0cb9325573df64bee34583.php.none) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No such file or directory in /home2/damian/public_html/villasdiani.com/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 53
    [07-Nov-2013 13:00:12] PHP Warning:  file_put_contents(/home2/damian/public_html/villasdiani.com/wp-content/cache/autoptimize/autoptimize_4d0598a85b07f9ed62f76a20c95e48a4.php) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No such file or directory in /home2/damian/public_html/villasdiani.com/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 52

    Also several tools are saying me that my homepage is not being cached, I am not sure if this is good or bad, but I assume it is bad:-(
    Also since this time my site is is not being indexed ?? I am not sure if this is connected.

    Plugin Author Frank Goossens

    (@futtta)

    For the Autoptimize-related errors; seems Autoptimize can’t (always) write to the cache-folder. Could be a rights problem on the cache/autoptimize folder or disk space-related. But when visiting your site, I see that the autoptimize-files are there, all seems to be well, no?

    For the homepage not being cached; Autoptimize does not do page caching, so that’s WP Super Cache, but based on the info in the homepage HTML source, WP Super Cache is indeed using a cached version. What those tools might be saying (and what indeed is WP Super Cache behavior), though, is that browsers are instructed not to cache the homepage (or any other page).

    Good morning Frank,thank you very much for your reply. What does this mean in a girl language:-( why I would have a rights problem? why they would be instructed not cache the home page or the other pages? I guess this is very bad:-( What should I do with it, I guess I have screwed up something in settings. I am not a professional, but I guess the home page should be cached, shouldn’t?

    Thank you very much
    July

Viewing 15 replies - 31 through 45 (of 86 total)
  • The topic ‘Expires/Max Age compatibility with SuperCache’ is closed to new replies.