Hello,
Following this thread: https://forum.xojo.com/10546-obtaining-image-url-for-embeded-images
I did some tests to verify that the images are cached. I used several methods, but every time I do not cache the images.
Xojo indicates that the image is cached (image.cached = true), but the tools of the browser (Chrome or Safari) indicate that the image is not cached, even if I reload the page several times.
The only time it works is when it is an image URL served by another server (ie https://www.google.fr/images/icons/product/chrome-48.png)
I use Xojo 2014R1 on Mac, debug mode, and standalone on Mac.
For example:
I have:
- image in IDE: image1
- webPage1
- a webPicture property of the webPage: wPic1
- an imageView object in the webPage: imageView1
In Open Event of webPage:
if wPic1=nil then
wPic1=new webPicture
wPic1.session=nil
wPic1=image1
end
imageView1.url=wPic1.url
I also tried with:
if wPic1=nil then
wPic1 = New WebPicture
end
wPic1.Session = Nil
Dim p As New Picture(100, 100, 32)
p.Graphics.ForeColor = &c0000ff
p.Graphics.FillRect(10, 10, 50, 50)
wPic1 = p
ImageView1.URL=wPic1.url (or imageView1.picture=wPic1)
The browser does not cache the image. I made ??a mistake or it works only in CGI?