by Keyframe · 16y ago · 0 comments
So what I did now is that basically I've made a 'forever frame' in my html which points to a URI where app resides. That app now outputs multipart/x-mixed-replace MIME which is then loaded into an iframe in my html and JS copied when onLoad happens to a styled div.
I've made a small proof of concept here:
- here is a straight sample output (in this case a dummy php): http://www.vga.hr/console_test/count.php
since this is a multipart/x-mixed-replace, I can blurt out a html (as 'Start' is) and plain afterwards.
- here is a simple client html: http://www.vga.hr/console_test/con_out.html - and another one which concatenates: http://www.vga.hr/console_test/con_out_plus.html
so my idea was basically to output text/html <script> out when I need to issue commands to a reader (for commands like overwrite mode, concatenate mode, highlight, clear, flash... whatever - basically a state machine) and text/plain for actual messages being shown.
I wish I could get rid of 'loading' status in browser while doing a long poll as primitive as I am now (forever frame).
tl;dr; should be on a client side only with x-mixed-replace on server.
Thanks again.
No comments yet.