Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2007-06-22 18:31:48

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Why I can't update my Thumbnail?

ruud wrote:

In that happens again, can you check the modification time of the thumbnail file

Could it be that this has had something to do with it? A while ago I moved a couple of sites to another server, in the USA. And I had some trouble getting the time right, had to set the time zone in preferences to GMT +5 to have it display the right posted time. But since some time now setting it to GMT +1 works as it should, so I assumed that at some point something on the server side changed (but of course I don’t really know what I’m talking about…)

And would you mind explaining what this does?

/1t.jpg?random_number

Offline

#14 2007-06-22 18:56:19

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Why I can't update my Thumbnail?

If your normal URL for the image is /1t.jpg, then /1t.jpg?574037552 requests that same image, only now with a query string “574037552” (random numbers in this case). This query string has no effect on an image itself or how the server sends it to the browser, but even if the browser for some reason keeps using a cached image when you use /1t.jpg, it has to get a new fresh copy when you use /1t.jpg?478932472, unless of course you have used that exact same URL before (because it can be cached as well). The use of the query string with random number makes it look like a totally new URL for the browser.

Hmm… if we stored the modification time of the image in the table, then we could use that as a query string to force a reload only when an image/thumb is updated. This would only affect the admin side.

Last edited by ruud (2007-06-22 18:57:41)

Offline

#15 2007-06-22 20:16:05

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Why I can't update my Thumbnail?

ruud wrote:

…The use of the query string with random number makes it look like a totally new URL for the browser.

I understand, thanks for clarifying!

Offline

Board footer

Powered by FluxBB