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

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.

Replies are listed 'Best First'.
Re^9: Mojolicious refresh
by LanX (Saint) on Mar 19, 2020 at 10:04 UTC
    > 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

      I'm not triggering an update from the client side. The client is listening on a web socket and waits for updates coming from the server.

      Greetings,
      -jo

      $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
        > I'm not triggering an update from the client side

        Maybe you should be clearer in your statements?

        You said:

        > > > > > where the page's content depends on some JS variables and is automatically refreshed whenever a variable's value changes.

        > The client is listening on a web socket and waits for updates coming from the server.

        Neither new nor "more advanced".

        I already listed this in my last point about web sockets.

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

        A reply falls below the community's threshold of quality. You may see it by logging in.