Deactivating the caching of images of the Web ImageView?

I’m using Xojo 2016.3 WebEdition and have some problems with the Web ImageView.

I’m loading an image from my Webserver with this code:

MZImageView_Bild.URL="http://www.mydomain:8080/pictures/nameofthepicture.jpeg"

That works.
At the same Xojo webpage I’m using a FileUploader to upload an image. After the upload ist complete, Xojo renames the picture to nameofthepicture.jpeg and overwrite the old on. Thats working, too.

Now the problem: when the upload, saving and renaming is done, I run the method again to show the picture, same code as before:

MZImageView_Bild.URL="http://www.mydomain:8080/pictures/nameofthepicture.jpeg"

But my Xojo app didn’t show me the new one. It still shows me the old picture. So I guess there is a caching problem. When I read old problems here in the forum, I find some solutions and hints. That an old Xojo version had an error. But I’m using the newest 2016.3.

Then I tried some thing like this:

// trying all variations of deleting the picture: 
  MZImageView_Bild1.Picture = MZBild_1x1Pixel_White // this is a white pixel 1x1 which I drag & drop into xojo to load it local
  MZImageView_Bild1.url = ""
  MZImageView_Bild1.Picture = nil

// and then again, to load the new picture. 
MZImageView_Bild.URL="http://www.mydomain:8080/pictures/nameofthepicture.jpeg"

But the ImageView always showing me the old picture.

When I open a new Safari Tab and call the URL http://www.mydomain:8080/pictures/nameofthepicture.jpeg directly, I see that the new picture is loading.
Switching back to my xojo app, then the new picture is there, too.

So: How can I deactivate the caching of pictures in ImageViews?

The caching is not done by the control, it is done by the browser.

A simple solution is to use a different image name.

Something like this should do it :
MZImageView_Bild.URL=“http://www.mydomain:8080/pictures/nameofthepicture.jpeg” + “?” + Str(Ticks)

[quote=293309:@Michel Bujardet]The caching is not done by the control, it is done by the browser.

A simple solution is to use a different image name.

Something like this should do it :
MZImageView_Bild.URL=“http://www.mydomain:8080/pictures/nameofthepicture.jpeg” + “?” + Str(Ticks)[/quote]
The good old trick of forcing a reload of images :slight_smile:

Michel, you are the king of Xojo!
It works! It’s so easy. And I tried so much things. I never thought, that the solution is so simple. THANK YOU!

It’s not a Xojo thing though. It’s just regular web.
I can agree on the king part though :wink:

:o