UE Web browser Widget does not refresh html after changes are made. Standalone browsers do

Hi,

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.

I actually found the reason. Somehow, things get a bit stuck when you use a local host. I’ll report if I find something else

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.

Ever find a way to turn it off?

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…

I know this is an old post, but in case someone needs a quick workaround, here’s how I was able to display the new content and trick the caching:

In my php page that I wanted to display inside the web browser widget, I made sure to set the following:

header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');

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.
rpage

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.