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

> Avoid polling. Changed content is pushed to the client.

Sure, but again:

what for would one want this? Speed?

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

Replies are listed 'Best First'.
Re^6: Mojolicious refresh
by jo37 (Curate) on Mar 19, 2020 at 09:09 UTC

    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$
      > 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.