in reply to Reload Browser Tab on Windows

I'm just hacking a little HTML demo where I want my browser to reload the page after running my script.

What kind of a script? Can't you use JS's window.location.reload();?

Replies are listed 'Best First'.
Re^2: Reload Browser Tab on Windows
by LanX (Saint) on Dec 21, 2020 at 21:13 UTC
    > What kind of a script?

    Sorry Script= Perl Program

    This is not JS-Monks after all! ;-)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      Sorry Script= Perl Program
      This is not JS-Monks after all! ;-)

      Sure, I just thought you might be playing with WebPerl ;-) I'm a little unclear on your architecture: would I be correct in guessing that you've got a Perl script that's generating static HTML, and that's why you want to reload the browser from the Perl script instead of from inside the HTML? (And even if that's the case, why not just whip up a quick server that serves the HTML on a local address? That way you could solve this using JS / Websockets / etc.)

        yes it's static html.

        > and that's why you want to reload the browser from the Perl script instead of from inside the HTML?

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

        > (And even if that's the case, why not just whip up a quick server that serves the HTML on a local address? That way you could solve this using JS / Websockets / etc.)

        I like automating my desktop beyond my IDE, it's purely for reducing turnaround time

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

        (That's basically the drama of my many projects, instead of "getting done" I'm hopping around trying to "get it right")

        Anyway I have a powershell solution now, which fits into one line. No need to install anything else. :)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery