Koenigsberg
Koenigsberg

Reputation: 1798

How and why does Weinre refresh client browser when pressing F5 in local browser?

I am developing web application on SAMSUNG devices, namely signage displays. That means TVs that are suitable for b2b long term use. We have been developing since Orsay and are currently developing on SAMSUNG's Tizen.

Basically we develop a web application, package it into a suitable Tizen widget using the Tizen SDK, put the widget and configuration on a server, connect a display to that server which will then download the application, install it and run it.

To monitor the application we are using Weinre. To do so we run a Weinre server and connect displays to that server using a line like this one:

<!-- WEINRE Remote include -->
<script type='text/javascript' src='http://thisissome.weinreserver.com:8081/target/target-script-min.js#WEINRE'></script>

When the respective page is loaded in the browser, a list of connections is displayed, there is a console available as well as a view of the DOM (basically like Web Inspector).

Now to my question.

I discovered recently that pressing F5 in the browser, while having one of the Weinre list entries selected, will not only refresh the browser page, but also force a refresh onto the web application that is being monitored. Put bluntly: I am loading the webpage that displays clients currently connected to my Weinre server. Then I select one of the entries displayed. Press F5. The browser window refreshes and the web-application on my display reloads as well.

Therefore I presume, something along the lines of

window.location.reload(false);

is being passed to the display-browser, because I can replicate the same behavior using this command to reload the browser page.

  1. How does Weinre issue this command to the client?
  2. Why does the reload trigger on F5, but not when manually clicking Refresh in my browser (here Chrome)?
  3. Can I prevent this? E.g. could this be related to a setting of our Weinre server or some client setting? I scoured the Weinre documentation to find something related, but did find nothing. Could be a bug, could be a feature.

Hopefully I provided enough information. Apologies if something is missing.

Upvotes: 1

Views: 113

Answers (0)

Related Questions