image changed but not reflected in the control

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

image changed but not reflected in the control

#1

Postby t4nu » Thu Sep 08, 2016 12:46 pm

Hi,
I have an image control and let the user to change it.
Any image file uploaded to change the image will be rename to the ID of the user, if the old one is exists it will deleted first.
The problem is, the image is still reflected the old one and not the new one, even after I issue the refresh.
Anyway to force the browser to reflect the changes immediately?
Thanks in advance for the help.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Sep 08, 2016 4:31 pm

Here's an answer from stackoverflow (very good source of technical information) http://stackoverflow.com/questions/1431 ... oad-images.

They suggest appending a querystring with a random number (or time, or version number, etc.):

Code: Select all

<img src="image.png?80172489074" alt="a cool image" />
0 x


Who is online

Users browsing this forum: No registered users and 14 guests