<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Another option would be to use WebSockets<div class=""><br class=""></div><div class="">Create a WebSocket Server (I am using <a href="https://pypi.python.org/pypi/websockets" class="">https://pypi.python.org/pypi/websockets</a> for one of my projects)</div><div class=""><br class=""></div><div class="">Then create a WebSocket call from within the Web Page.</div><div class=""><br class=""></div><div class="">Your server could then not only supply any changes dynamically, it could then also act as a watchdog timer on the requests from the client - e.g. if it has not been asked for a information refresh in X minutes, then it is a fair guess that there is something wrong.</div><div class=""><br class=""></div><div class="">If want more details about how it could work, let me know.</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Ming</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 23 Jan 2015, at 21:54, Emyr Morris <<a href="mailto:em@preseli.com" class="">em@preseli.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">yessss.... ajax - I was hoping to avoid ajax<br class=""><br class=""></div>Just as I pushed the send button on my initial email JS and AJAX came to my mind.<br class=""><br class=""></div><div class="">the project started off easy, I was going to just supply JPEGs on a memory stick plugged into the tellies<br class=""><br class=""></div><div class="">Then he said about turning things on and off... changing prices on a weekly basis, and then wanting it controlled from his ipad<br class=""><br class=""></div><div class="">that is when it became a client server setup<br class=""><br class=""></div><div class="">that was the point I should have jacked the price up significantly to push him back to keeping it simple, but I am a sucker for a challenge.<br class=""><br class="">It is all databased so AJAX isn't a problem<br class=""><br class=""></div><div class="">I have really optimised all the files so a refresh isn't at all bad, the nice HD background is the slowest thing loading.<br class=""><br class=""></div><div class="">what is scary though is if it loses connection to the server and the customers don't have a menu to look at. There a JS solution would be much better as it could cache data until it gets a new connection<br class=""><br class="">I had thought of doing a cron job to detect if it had lost the server connection, and if so it would simply pipe a pre-defined screen capture to /dev/fb0<br class=""><br class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On 23 January 2015 at 21:41, Justin Mitchell <span dir="ltr" class=""><<a href="mailto:justin@discordia.org.uk" target="_blank" class="">justin@discordia.org.uk</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 2015-01-23 at 20:28 +0000, Emyr Morris wrote:<br class="">
<br class="">
> I was hoping to have something monitor chromium and if it detected<br class="">
> that the browser had frozen / stopped responding or hadn't refreshed<br class="">
> for a certain period of time, it would close the browser and re-open<br class="">
> it<br class="">
><br class="">
><br class="">
> I thought I had found an example a few months ago and bookmarked it,<br class="">
> but I can not for the life of me find the example again.<br class="">
><br class="">
><br class="">
> for example, I have a web page that is refreshed every 5 mins, if<br class="">
> chromium has not refreshed in 10 mins it needs to be restarted.<br class="">
><br class="">
><br class="">
> currently I am using a very simple<br class="">
> <meta http-equiv="refresh" content="120"><br class="">
> to reload the page,<br class="">
> I would value advice. Thanks<br class="">
<br class="">
</span>If there is a webserver on the pi have some javascript polling a simple<br class="">
cgi script (a bash script would do) via ajax, so it isnt disturbing the<br class="">
main page.<br class="">
<br class="">
its easy enough to check that a process is still running from a shell<br class="">
script, but thats no indication that the page involved is still<br class="">
running/reloading.<br class="">
<br class="">
Whilst there may be some cache and status files that belong to the<br class="">
browser, i dont imagine that it would be a terribly reliable indication<br class="">
of anything.<br class="">
<br class="">
as an aside, those kind of page reloads are awefully klunky and<br class="">
disruptive, if you need any guidance on ajax, jquery, and other more<br class="">
modern stuff I or one of the others will gladly help i'm sure.<br class="">
<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
Hackspace mailing list<br class="">
<a href="mailto:Hackspace@swansea.hackspace.org.uk" class="">Hackspace@swansea.hackspace.org.uk</a><br class="">
<a href="http://swansea.hackspace.org.uk/mailman/listinfo/hackspace" target="_blank" class="">http://swansea.hackspace.org.uk/mailman/listinfo/hackspace</a><br class="">
</blockquote></div><br class=""><br clear="all" class=""><br class="">-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.<br class=""> <br class="">Mae'r e-bost hwn ac unrhyw ffeiliau a drosglwyddir gydag ef yn gyfrinachol ac at ddefnydd yr unigolyn neu'r corff y cyfeiriwyd hwy atynt yn unig.</div></div></div>
</div>
_______________________________________________<br class="">Hackspace mailing list<br class=""><a href="mailto:Hackspace@swansea.hackspace.org.uk" class="">Hackspace@swansea.hackspace.org.uk</a><br class="">http://swansea.hackspace.org.uk/mailman/listinfo/hackspace<br class=""></div></blockquote></div><br class=""></div></body></html>