I’ve developed a cloud (web) app for a client. When testing on Windows, sometimes the graphics don’t refresh when coming back to a prior page. Even when the client closes the tab (in their browser) and reopens the app in another tab.
The client has not paid to convert their app to web 2.0 (so their app is stuck in an older version (2019/2020) of Xojo.
I think each page is instantiated so that it’s NOT still in memory when the user closes (moves) to another page.
I’m sorry, I read it as Eric was testing Web 2 (before doing a paid update).
Now that I read it again, yes it looks like the problem is with the current Web 1 application.
When the page loads initally, all the images display.
When the user moves to another page, and comes back, the graphics don’t show.
These are webimages (not canvases).
Is your app on Xojo Cloud or another provider? Which browser is the client running? Are these images part of your project or are they loading dynamically via the URL property?
Here’s a snippet of code I use to load images off of the web server storage from the SpecialFolder.Resource location. As you can see the filenames are in the DB. ImageFront and ImageBack are WebImageView controls. Additionally ImageBack is control set. I’ve not had any problems with these images loading “or reloading” on either Mac or Windows using this technique. Hope this helps.
I found the best way was nginx in front of xojo, handling part of the url e.g. /_Images/ and parsing the image files back, which means they can be referenced as html links from within the project. Seems to work well with caching etc.
In Web 1.00 (and possibly Web 2.00), pages stay in memory. So when you come back to a previously displayed page, it will not refresh automatically.
Note that if your pictures have been dragged into the project, they are displayed in ImageViews through a webfile. It is possible that the webfile has timed out.
The best way to display images is to store them in a web space, and simply point to them in the ImageView via URL. That way they don’t time out, and display is much faster. You can get dirt cheap web space with hostgator.com or namecheap.com.
If for some reason you don’t have access to a web space, you could add some code to close the Webpage when you move to another page, and reload it when the user comes back.