Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-21 18:34:55

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Image refresh

I’m sure some of you have come across the problem where you upload/resize an image and it’s not refreshed in the browser until you manually click the refresh button (sometimes repeatedly).

This can actually be fixed pretty easily, after the image src just add “?” followed by anything random. For example I changed txp_image.php so the image tag looks something like this: <img src="'.hu.$img_dir.'/'.$id.'t'.$ext.'?'.rand().'" /> and tada problem solved.

This is actually an incredibly useful trick and applies to Javascript/AJAX stuff too…

Last edited by rloaderro (2007-02-21 18:35:40)


Travel Atlas * Org | Start Somewhere

Offline

#2 2007-02-21 19:39:35

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Image refresh

thanks, this has bugged me for ages.

Offline

Board footer

Powered by FluxBB