in reply to Reload Browser Tab on Windows

It's easy to automate in two ways:

The cross-browser way would be to serve the HTML through a local webserver and inject a small websocket script into it that calls back to the server and leans when the HTML or CSS get changed. See Mojolicious::Plugin::AutoReload or my App::Mojo::AssetReloader.

The Chromium/Chrome/Edge-only way would be with WWW::Mechanize::Chrome and Filesys::Notify::Simple, reloading the page whenever it needs to be reloaded. This has the slim advantage of not modifying the HTML page.

Replies are listed 'Best First'.
Re^2: Reload Browser Tab on Windows
by LanX (Saint) on Dec 21, 2020 at 21:17 UTC
    yeah, sure. I also hacked a JS-snippet 15+ years ago that did a reload based on the change time of a local file. :)

    But a little help with Win32::OLE would be nice. I'm also interested to move windows to have my IDE and Browsers side by side, depending on screen resolution.

    Though looks like I can do it with powershell.

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

      WWW::Mechanize::Chrome can move and resize the browser window as well:

      $mech->target->send_message('Browser.setWindowBounds', windowId => $window_info->{windowId}, bounds => { 'height' => 1600, 'top' => 0, 'width' => 2560, 'left' => 0, }, )->get;
        Sure ... but not FF or my editor or my SQL GUI or ...

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