I’ve been using the web browser widget for Unreal. I am noticing that changes in html do not update accurately on the UE4 web browser widget. It is saving some type of cache, or memory. The html pages show accurately on Chrome web browser and Explorer when the same html page is loaded, yet they do not when I use the Web browser widget.
There is a webcache folder under “projectname\saved\webcache” for editor projects and under “user\appdata\local\projectname\saved\webcache” for packeged projects.
Delete it by hand. I wish there would be a non-cache mode for the “web browser widget” becaus it’s causing a lot of trouble here.
I know it’s an old post, but I would like to know also if we can turn it off the cache.
With some url, the loadUrl works at runtime but sometimes it doesn’t work and doesn’t load the new one…
by doing this you make sure the page never gets cached. UE’s web browser however, will still cache it. In order to fix that we’ll have to force-refresh the page:
create a custom event → execute javascript [location.reload();] → bind your web_browser ref to the target of the Execute JS node.
call this custom event after you perform any server updates and you want the page to display the new content.
Another nifty little thing that I concocted together was, if you want to make sure people don’t just right click and see the source page (like any browser) you can disable the right click context menu like so:
by doing this the users can’t rightclick on your web_browser page and view the source.
As a matter of fact if you integrate it well and your html/css/js is well put together, the user will never know that it is an actual web browser you are loading there.
Hope this helps someone, as I spent a few nights searching for a solution to display new content, once the page gets updated. This is the best I could come up with.
As always, if there are better options, I’m always interested.