HTMLViewer keeps loading old, wrong HTML file?

I am quite perplexed. I have an HTML viewer in my app and it simply loads a HTML file saved on my website. However, it keeps loading an old version of said HTML file even after its been updated. I temporarily renamed on my website and it still loaded the old HTML file. What the heck? Is it loading a cached version somewhere?

I am using this in a HTMLViewer:
me.loadURL(“https://mywebsite.com/download/description.html”)

Yes. I have with with my host (SiteGround). I need to log into my host and clear the Dynamic cache, then my web sites and Help pages show the most recent changes.

This also affects file downloads. My web apps check on startup and daily for the latest Certificate that I host. This means that I update the Master Certificate once then all web apps use the latest certificate for https access. URLConnection will get the cached file, so I place the latest file on my host, clear the cache, then wait for them to update.

It’s very likely a cache issue. You can often solve the problem by adding an unused parameter to the end of the URL. Something like:

me.loadURL(“https://mywebsite.com/download/description.html?Rand=”+str(System.Random.Number))

As long as the document doesn’t actually take parameters you should confuse any cache system between you and the server.

2 Likes

Thank you, that worked. I will use this moving forward. Too bad all my apps out there in the field keep pulling up an old update HTML notice.

If you right click on the HTMLViewer window you get a menu that contains “Refresh”. That forces the page to reload correctly. Not suitable but it does prove that the problem is caching.

So often doesn’t correct matters for me.

1 Like

But on a related note: I have a few pages that work OK in Safari, yet fail to display images which are all present and correct, if I use Chrome.
Anyone any ideas what I could check apart from caching, or does Safari and Chrome handle this differently?