Is there any backend function that use to clear image cache from admin panel.
because when image replace with new one customer face issue on caching
Is there any backend function that use to clear image cache from admin panel.
because when image replace with new one customer face issue on caching
Hi Shiwanka
GetImage will automatically create a new image if a new one is uploaded - given the date modified is newer than the thumbnail.
In backend, you can force it by going to Files->Cache->Image and just delete that entire folder.
But I do not think that is the issue - I think it is browser cache. You can do CTRL+F5 to force upgrade the browser cache.
You can also disable the browser cache of images using "Web & Http"-> HTTP and set the output cache to 0 - meaning no browser cache. THIS IS NOT RECOMMENDED as it would cause enourmous performance issues and server load.
BR Nicolai
Thanks Nicolai
Is there a better solution for this today? I am hit by the same. Ctrl+F5 is nice for backend users, but not for frontend users. Isn't there an option like etags to tell the browser whether the image has changed or not?
This is how web cache works... You have the choice between a slow(er) website or have to wait for the cache to invalidate.
DW do send out an etag - but also sends out a max-age. Not until the max-age is reached will the browser send a request for that image using the etag in a If-None-Match header and will receive a 304 back if the image has not changed.
So both things are at play here - if you set max-age to 0, there will be a lot of requests for the images to ask the server if it was changed - and then you get the 304 back. But then you will not avoid the many requests, just the size of the response. SEO and Lighthouse will be very red if you do this.
So it is a very bad practice to set the max-age to low values.
If you indeed have "Image1.jpg" in a new version, call it "image1_new.jpg"
If it is a really big deal and this happens over and over again, you can change the image to do Getimage.ashx?....&ts=23489123412 and read the time stamp from server. Just a lot of i.o....
>> So it is a very bad practice to set the max-age to low values.
Agreed
>> If you indeed have "Image1.jpg" in a new version, call it "image1_new.jpg"
Yeah, that's what I have been telling the customer also.
>> If it is a really big deal and this happens over and over again, you can change the image to do Getimage.ashx?....&ts=23489123412 and read the time stamp from server. Just a lot of i.o....
Yep, and it looks like that's what I'll implement next.
Imar
Customer Bei****m?
Nope :-)
You must be logged in to post in the forum