in reply to Re^5: Mojolicious refresh
in thread Mojolicious refresh

In my case to avoid unnecessary traffic, especially for generated images.

I can't tell how "smooth" your approach works. The push initiated update happens almost invisible.

Greetings,
-jo

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

Replies are listed 'Best First'.
Re^7: Mojolicious refresh
by LanX (Saint) on Mar 19, 2020 at 09:41 UTC
    > push initiated update

    Probably, but logically it's a pull if you say it's initiated by the client.

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

      Probably, but logically is a pull if you say it's initiated by the client.

      The client opens the connection, yes, but after that the connection stays open for a longer period of time and the server does indeed push its updates to the client. See for example Using server-sent events and how to implement them in Mojolicious.

        > the server does indeed push its updates to the client

        Technically yes, that's the benefit of web sockets I listed.

        But he said he's triggering it from the client via angular, which means requesting the update.

        And in this case I'd like to know the benefits over a normal XMLHttpRequest.

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