<div dir="ltr"><div><div>yessss.... ajax - I was hoping to avoid ajax<br><br></div>Just as I pushed the send button on my initial email JS and AJAX came to my mind.<br><br></div><div>the project started off easy, I was going to just supply JPEGs on a memory stick plugged into the tellies<br><br></div><div>Then he said about turning things on and off... changing prices on a weekly basis, and then wanting it controlled from his ipad<br><br></div><div>that is when it became a client server setup<br><br></div><div>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><br>It is all databased so AJAX isn't a problem<br><br></div><div>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><br></div><div>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><br>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><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 January 2015 at 21:41, Justin Mitchell <span dir="ltr"><<a href="mailto:justin@discordia.org.uk" target="_blank">justin@discordia.org.uk</a>></span> wrote:<br><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>
<br>
> I was hoping to have something monitor chromium and if it detected<br>
> that the browser had frozen / stopped responding or hadn't refreshed<br>
> for a certain period of time, it would close the browser and re-open<br>
> it<br>
><br>
><br>
> I thought I had found an example a few months ago and bookmarked it,<br>
> but I can not for the life of me find the example again.<br>
><br>
><br>
> for example, I have a web page that is refreshed every 5 mins, if<br>
> chromium has not refreshed in 10 mins it needs to be restarted.<br>
><br>
><br>
> currently I am using a very simple<br>
> <meta http-equiv="refresh" content="120"><br>
> to reload the page,<br>
> I would value advice. Thanks<br>
<br>
</span>If there is a webserver on the pi have some javascript polling a simple<br>
cgi script (a bash script would do) via ajax, so it isnt disturbing the<br>
main page.<br>
<br>
its easy enough to check that a process is still running from a shell<br>
script, but thats no indication that the page involved is still<br>
running/reloading.<br>
<br>
Whilst there may be some cache and status files that belong to the<br>
browser, i dont imagine that it would be a terribly reliable indication<br>
of anything.<br>
<br>
as an aside, those kind of page reloads are awefully klunky and<br>
disruptive, if you need any guidance on ajax, jquery, and other more<br>
modern stuff I or one of the others will gladly help i'm sure.<br>
<br>
<br>
<br>
_______________________________________________<br>
Hackspace mailing list<br>
<a href="mailto:Hackspace@swansea.hackspace.org.uk">Hackspace@swansea.hackspace.org.uk</a><br>
<a href="http://swansea.hackspace.org.uk/mailman/listinfo/hackspace" target="_blank">http://swansea.hackspace.org.uk/mailman/listinfo/hackspace</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>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> <br>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>