Pagespeed issues rewriting - image cache just headers

Skip to first unread message

Adam Smith

Feb 15, 2022, 2:09:37 PM2/15/22
to mod-pagespeed-discuss
Hi. I've been chasing this issue for a full day.

My Apache Server is no longer returning the webp versions of images or caching any files. The original files in their original format and original names are always returned to the client.
I can see in /var/cache/mod_pagespeed/v3/,3A/, the full contents of the website, however every file (regardless of type) is 173 bytes in length and simply contains a header similar to:

        ^DDate^R^]Mon, 14 Feb 2022 14:24:29 GMTJ(
        ^GExpires^R^]Mon, 14 Feb 2022 14:29:29 GMTJ^\

I have tried flushing the cache, re-installing pagespeed, and even built a new server, but keep getting the same responses.

I can see in the which has lots of:

        [Info] [16189] HTTPCache key= remembering recent failure for 299 seconds.

I've checked the logs of the proxied app and I see the request for the file with a 200 response and the agent as pagespeed.

The Apache server hosts several virtual hosts that are reverse-proxied to application servers. Some of the hosts still work with pagespeed returning the webp files, etc. I've looked at the headers of the working and non-working apps (directly - bypassing the apache server) and they are the same with regards to cache and pagespeed.

I'd appreciate it, if someone has some options I can try to help identify the issue.


        <IfModule pagespeed_module>

                ModPagespeed on

                AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
                ModPagespeedFileCachePath "/var/cache/mod_pagespeed/"
                ModPagespeedLogDir "/var/log/pagespeed"

                ModPagespeedSslCertDirectory "/etc/ssl/certs"
                ModPagespeedFetchHttps enable
                ModPagespeedPreserveUrlRelativity on

                ModPagespeedFileCacheInodeLimit        500000

                ModPagespeedEnableCachePurge on

                ModPagespeedListOutstandingUrlsOnError on
                ModPagespeedStatisticsLogging on

                ModPagespeedMessageBufferSize 100000

                ModPagespeedEnableFilters extend_cache
                ModPagespeedEnableFilters rewrite_images



Feb 15, 2022, 2:14:18 PM2/15/22

Can you try to remove all CDN, and Proxies and try again?

You should also have a header Cache value public.

What's happening if you remove that line "   AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html" ?


Chris-Anthony CHAULVET | CEO

Office: (+33)1 77 62 44 31 Cell: (+33)6 33 30 64 12 - LinkedIn - Instagram - Calendly

Garanti sans virus.

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
To view this discussion on the web visit


Feb 16, 2022, 4:07:15 AM2/16/22
to mod-pagespeed-discuss

This " [Info] [16189] HTTPCache key=..." say that pagespeed can´t find the cached optimized resource and remember the failure this amount of time.
Maybe a file write permisions?

Make a request with debug enabled and take a look at the html code, debug messages are set as html comments.

These "strange things" you see maybe are the metacache data. Pagespeed stores not only the optimized resource but metadata about it.

^DEtag^R^RW/"PSA-12345678"Xà§^Rh^@p^@ this header tell me that IPRO is working.
IPRO is an "on the fly" optimizer, don´t rewrite url but you can see in headers a x-original-content-length and some optimizations.
Optimized resources have an etag header like W/"0"

^MCache-Control^R^Kmax-age=300J^Z This seem to be the origin cache-control header so the optimized resource lives 300sec on the pagespeed cache aka the resource need to be optimized every 5 minutes.


Feb 16, 2022, 4:15:28 AM2/16/22
to mod-pagespeed-discuss
Hi again

Maybe a issue with mod_rewrite?
Check diff between working serves and non working serves regarding the use of mod_rewrite in all apache config files, .htacces included.

Adam Smith

Mar 22, 2022, 11:38:10 AM3/22/22
to mod-pagespeed-discuss
Sorry guys, other work loads prevented me taking this further until now. Thanks for your responses. Unfortunately, none of them appeared to help, however I have discovered that the app developers had added a header within their application that was 'No Cache', so pagespeed was not caching anything - Even though it recorded the actions and created the 173 byte files. Once I got the developers to remove the header,  hey presto - working again.

Thanks again. Hope it helps someone in the future.

Reply all
Reply to author
0 new messages