Obtaining image URL for embeded images

Yes in theory you are correct but for some odd reason on iOS devices the appcache appears to be processed by the browser quicker than standard cached images and rendered as part of the page rather than post page load. My guess is that the appcache files are loaded by the browser as soon as the site URL is requested (load time increases on files not yet cached) whereas the cached are on browser request thus you can get a slight flicker effect. This can be seen more with larger images. Also the appcache allows you to specify which images are held locally and force the ones that you want to be loaded remotely etc. I am still not 100% convinced I can get it to work as I need to work a way to alter the “” to “”

Greg, what do you mean by:

What does that do?

Also, Michel, I am using a standalone server running under windows so if I have a folder with images in say “myimages/abc.png” and I deploy those as part of the project (using the external option) will I be able to reference them directly using the standalone server e.g. “http://www.aaaa.com:8080/myimages/abc.png” or will I have to write my own URL handler to be able to access the images?

[quote=75717:@Nathan Wright]I am using a standalone server running under windows so if I have a folder with images in say “myimages/abc.png” and I deploy those as part of the project (using the external option) will I be able to reference them directly using the standalone server e.g. “http://www.aaaa.com:8080/myimages/abc.png” or will I have to write my own URL handler to be able to access the images?

[/quote]

As long as your images are accessible via an url, you can simply enter the URL as source for your image in the IDE at design time :

In your example, you would simply enter http://www.aaaa.com:8080/myimages/abc.png in the URL field of the imagewell.

There is a way by using HandleSpecialURL.

“…/special/mypic.png”

Then inside HandleSpecialURL you simply select the name ‘mypic.png’ and return the embedded image you want. (it is also a way to have dynamic images with the same URL). I use it to retrieve all my images.

This way you already have the list of all your images URLs even before compilation.

Cheers,
Guy.

I keep a dictionary Name to WebImage pairs. By setting the session to nil on the WebPicture it will be available in all sessions. You can load all the images into this dictionary at launch of the web app, but I just do it with lazy instantiation and add to the dictionary as the images are requested and their keys are not found.

It might be important to note Greg found an issue where the events are not sent to the browser from the server all at once in certain instances and this can cause some annoying “late image loading” effects. Once this is fixed it should make everything appear from the users perspective as running seemlessly.

Careful since this may NOT be thread safe and requests are threads
As long as there are no yield opportunities (loop boundaries for sure) you should be safe

[quote=75924:@Norman Palardy]Careful since this may NOT be thread safe and requests are threads
As long as there are no yield opportunities (loop boundaries for sure) you should be safe[/quote]

Would CriticalSection or a Semaphore safe guard this?

You could since it would be very short lived