Recently I used html widgets in Hype without any problems. Now, for one of my projects I changed a website on our local server. This website is referenced in an HTML widget of my Hype Application.
Then strange things happened.
Since I updated the website (solely with some html code, no scripting) two things changed:
The updated website does not appear in my html widget. It still shows the previous version of the website.
More important: Since then, when I embed new HTML widgets (even in a new project) neither Hype itself nor exported websites show the content of these widgets.
In other words:
HTML widgets don‘t work at all any more. They do not show the websites no matter which URL I try to use.
This problem occurs on two macbooks in two different location. Internet connection works fine on both.
Installing latest updates of Hype did not solve the problem.
I think I found a solution for one part of the problem:
All the websites I tried to include into my widgets where commercial sites that do not allow being embedded into an iframe. My fault.
But the problem that startet it all still exists:
I usually embed an html document from our own webserver which works fine inside an html widget of Hype.
But if I change this html document on our webserver, then the new version will neither appear inside Hype 4 nor inside the browser that shows the app. In both cases I still see the old version. A browser refresh does not help, restarting Hype doesn't help either.
It only appears correctly when I view my exported Hype app in a browser that did not have it before.
So it's a problem of updating the html file.
Enclosed I send you my example project only containing the widget.
The referring test page is this: https://www.sts.tuhh.de/teaching/schedule/schedule-flur.html
It only contains the text
"The schedule for our upcoming semester will be published soon."
My Hype project still shows the previous version with the text
"The schedule for the upcoming semester will be published soon."
So for this test I was only switching "the" to "our".
I couldn't manage to upload the Hype project file. You can download it from here:
This might be a problem on the openresty server sts.tuhh.de. It may be telling browsers to cache content for too long, despite changes on the server. Cache-Control, ETag, or Last-Modified headers sent when loading a web page will tell the browser 'download this again' or 'this is the current version'. So if a browser has loaded that schedule page previously, it may not be re-requesting new content. You may be able to work around this by loading this page with a query string like: https://www.sts.tuhh.de/teaching/schedule/schedule-flur.html?123
You can come up with a new query string by using code in this document: schedule.hype.zip (15.3 KB)
The rectangle contains an iframe, which is populated with the new schedule + query string on each load.