Pagespeed override cache control rules

52 views
Skip to first unread message

Sylvain Pasquet

unread,
Mar 28, 2018, 4:17:17 AM3/28/18
to mod-pagespeed-discuss
Hello, i have i big problem with pagespeed, it overriding the cache control rules:

With pagespeed URL picture:
curl -I https://www.maxicoffee.com/images/products/small/ecam_22110b_control_pannel.jpg.pagespeed.ce.5o4q1mjlOg.jpg
HTTP/1.1 200 OK
Date: Wed, 28 Mar 2018 08:10:59 GMT
Last-Modified: Fri, 17 Mar 2017 15:57:15 GMT
Expires: Thu, 28 Mar 2019 08:10:59 GMT
Cache-Control: max-age=31536000

With raw URl:
curl -I https://www.maxicoffee.com/images/products/small/ecam_22110b_control_pannel.jpg
HTTP/1.1 200 OK
Date: Wed, 28 Mar 2018 08:13:29 GMT
Server: Apache/2.4.10 (Debian)
Vary: User-Agent
Expires: Wed, 28 Mar 2018 08:18:29 GMT
Cache-Control: max-age=300 <--- No cache ? WTF ?

IF i disable pagespeed my cache control rules in htaccess is ok:
curl -I https://www.maxicoffee.com/images/products/large/ecam_22110b_control_pannel.jpg?PageSpeed=off
HTTP/1.1 200 OK
Date: Wed, 28 Mar 2018 08:14:19 GMT
Server: Apache/2.4.10 (Debian)
Vary: User-Agent
Accept-Ranges: bytes
Content-Length: 49710
Cache-Control: max-age=2591000, public


Its a problem, because async picture loading doesnt use "img" tag, the result is raw query on picture without caching rule :-(

This is my htaccess rules:
<IfModule mod_headers.c> 

     <FilesMatch "\.(ico|jpe?g|svg|png|gif|swf|css|woff|js|gz)$">
        Header set Cache-Control "max-age=2591000, public"
        Header unset Last-Modified
     </FilesMatch>

    Header unset ETag
    FileETag None
    Header unset Pragma
</IfModule>



What can I DO ?

Thanks a lot ;-)

Otto van der Schaaf

unread,
Mar 28, 2018, 4:49:56 AM3/28/18
to mod-pagesp...@googlegroups.com
The cache-control:300 header should be transient, and go away after a couple of page loads.
PageSpeed emits it when it is still working to process optimizations in the background.

Otto

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/f780a51a-3b51-49dd-b098-258b552b3b5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sylvain Pasquet

unread,
Mar 28, 2018, 6:01:04 AM3/28/18
to mod-pagespeed-discuss
Sorry but the optimized version already exist ( https://www.maxicoffee.com/images/products/small/ecam_22110b_control_pannel.jpg.pagespeed.ce.5o4q1mjlOg.jpg ) there is no pending jobs on the picture.

The problem is when i try to access to raw URL ( like in a javascript async load ), there is ALWAYS NO CACHE FOR EVER


With raw URl:
curl -I https://www.maxicoffee.com/images/products/small/ecam_22110b_control_pannel.jpg
HTTP/1.1 200 OK
Date: Wed, 28 Mar 2018 08:13:29 GMT
Server: Apache/2.4.10 (Debian)
Vary: User-Agent
Expires: Wed, 28 Mar 2018 08:18:29 GMT
Cache-Control: max-age=300 <--- No cache ? No transient, it will be always like that after 2 month.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
Mar 28, 2018, 6:12:32 AM3/28/18
to mod-pagesp...@googlegroups.com
I see. It's worth upgrading the mod_pagespeed version to the latest stable to see if that fixes
the persisting conservative cache TTL.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/92cb0a73-f326-4f5d-96b1-d1b00e405be5%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages