I don't get it, any JS or meta-tag solution would indiscriminately work from a static file too.

Well yes, they would work insofar as they can reload the page, but in the root node you said "reload the page after running my script", so I thought this timing was important: my guess was that your script would be generating the static HTML file and you want to reload the browser with that newly generated HTML. This is IMHO much simpler (and probably more importantly, cross-platform and cross-browser portable) to do with a live connection to an HTTP server...

And installing Mojo and getting acquainted with websockets would stop my current project.

It's not that difficult ;-) In the very basic form, you just need some HTTP server and the HTML page can poll the server. The EventSource API and WebSockets are just advanced forms. If you were to give more specifics, like what this script is generating, how complex the script is (i.e. if it could be integrated into a webserver easily or it should stay standalone), how long the generation takes (i.e. whether it can be done in a few ms on the fly or it takes a minute), how often it gets run, and so on, I could make a more specific suggestion.


In reply to Re^5: Reload Browser Tab on Windows by haukex
in thread Reload Browser Tab on Windows by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.