New image versions are not loaded but older version keeps being served from cache

28 views
Skip to first unread message

L.W. van Vliet

unread,
Dec 5, 2017, 5:13:47 AM12/5/17
to mod-pagespeed-discuss
Hi,

I started using Pagespeed for apache. Now I noticed that when I update an image on the server, that new version of the image is not served to the browser.
I keep seeing the older version of the image. Even when I force to reload cache in the browser or clear the cache in the browser.

Only when I add a unique id to the end of the image url (for example with timestamp like ?20171205) the new version of the image is loaded. If I then remove the timestamp and try to load the normal image url I get the older image version again.

Before I installed Pagespeed I already used these timestamp id's in image urls to force new images to be loaded correctly but I want it to be automated. If there is a newer version available on the server then that latest version should always be served. When the client already has the latest one it must served from cache of course.

I hope someone can help me and explain how apache (pagespeed) can be configured to automatically serve the latest version of images and other static content or use cache in the best possible way.

Thanks,

Laurens

Otto van der Schaaf

unread,
Dec 5, 2017, 5:16:05 AM12/5/17
to mod-pagesp...@googlegroups.com
Taking a look at https://www.modpagespeed.com/doc/faq#ignores-changes may be helpful.

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/dd6cb27d-2bcc-45e4-9055-ac2739876e04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

L.W. van Vliet

unread,
Dec 5, 2017, 6:42:01 AM12/5/17
to mod-pagespeed-discuss
Hi Otto,

thank you for your quick response.
I read the documentation you were referring to but I'm not sure how to change to TTL for the static content on my server.

The response headers on an image on my server now look like this:
HTTP/1.1 200 OK Date: Tue, 05 Dec 2017 10:53:26 GMT Server: Apache/2.2.15 (CentOS) Content-Length: 57405 Accept-Ranges: bytes X-Original-Content-Length: 59875 Etag: W/"PSA-aj-kUF_FWc0fo" Expires: Tue, 12 Dec 2017 07:43:38 GMT Cache-Control: max-age=593411, public X-Content-Type-Options: nosniff Keep-Alive: timeout=5, max=299 Connection: Keep-Alive Content-Type: image/jpeg

Do you have any pointers on how to proceed?

Thanks,

Laurens
Op dinsdag 5 december 2017 11:16:05 UTC+1 schreef Otto van der Schaaf:
Taking a look at https://www.modpagespeed.com/doc/faq#ignores-changes may be helpful.

Otto

On Tue, Dec 5, 2017 at 11:13 AM L.W. van Vliet <lwvv...@gmail.com> wrote:
Hi,

I started using Pagespeed for apache. Now I noticed that when I update an image on the server, that new version of the image is not served to the browser.
I keep seeing the older version of the image. Even when I force to reload cache in the browser or clear the cache in the browser.

Only when I add a unique id to the end of the image url (for example with timestamp like ?20171205) the new version of the image is loaded. If I then remove the timestamp and try to load the normal image url I get the older image version again.

Before I installed Pagespeed I already used these timestamp id's in image urls to force new images to be loaded correctly but I want it to be automated. If there is a newer version available on the server then that latest version should always be served. When the client already has the latest one it must served from cache of course.

I hope someone can help me and explain how apache (pagespeed) can be configured to automatically serve the latest version of images and other static content or use cache in the best possible way.

Thanks,

Laurens

--
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-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
Dec 5, 2017, 2:45:21 PM12/5/17
to mod-pagesp...@googlegroups.com
If you only have static files, setting up LoadFromFile is probably your nicest option:

It that doesn't work for you, perhaps taking look at how to configure mod_expires will be useful:

Otto


On Tue, Dec 5, 2017 at 12:42 PM L.W. van Vliet <lwvv...@gmail.com> wrote:
Hi Otto,

thank you for your quick response.
I read the documentation you were referring to but I'm not sure how to change to TTL for the static content on my server.

The response headers on an image on my server now look like this:
HTTP/1.1 200 OK Date: Tue, 05 Dec 2017 10:53:26 GMT Server: Apache/2.2.15 (CentOS) Content-Length: 57405 Accept-Ranges: bytes X-Original-Content-Length: 59875 Etag: W/"PSA-aj-kUF_FWc0fo" Expires: Tue, 12 Dec 2017 07:43:38 GMT Cache-Control: max-age=593411, public X-Content-Type-Options: nosniff Keep-Alive: timeout=5, max=299 Connection: Keep-Alive Content-Type: image/jpeg

Do you have any pointers on how to proceed?

Thanks,

Laurens
Op dinsdag 5 december 2017 11:16:05 UTC+1 schreef Otto van der Schaaf:
Taking a look at https://www.modpagespeed.com/doc/faq#ignores-changes may be helpful.

Otto

On Tue, Dec 5, 2017 at 11:13 AM L.W. van Vliet <lwvv...@gmail.com> wrote:
Hi,

I started using Pagespeed for apache. Now I noticed that when I update an image on the server, that new version of the image is not served to the browser.
I keep seeing the older version of the image. Even when I force to reload cache in the browser or clear the cache in the browser.

Only when I add a unique id to the end of the image url (for example with timestamp like ?20171205) the new version of the image is loaded. If I then remove the timestamp and try to load the normal image url I get the older image version again.

Before I installed Pagespeed I already used these timestamp id's in image urls to force new images to be loaded correctly but I want it to be automated. If there is a newer version available on the server then that latest version should always be served. When the client already has the latest one it must served from cache of course.

I hope someone can help me and explain how apache (pagespeed) can be configured to automatically serve the latest version of images and other static content or use cache in the best possible way.

Thanks,

Laurens

--
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.

--
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/8f1a890a-2a8f-46ff-bbcf-0fa269f9fb88%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages