Minecraft PC IP: play.cubecraft.net
  • We're running an internal migration of all old players' stats to our new highly advanced statistics tracking backend. This means that stat changes will be a bit delayed while we ingest this huge backlog of data. Nothing is being lost, it'll just take a bit longer to show up in the in-game UIs.

_Oplex_

Dedicated Member
May 5, 2016
694
1,059
198
Under Your Bed (O.o)
So lets say i have 2 people. And they both go on the same page. All they see is a empty textArea. If person1 would edit the text i want to also change the text on person2 screen. First i want to try simple ajax, but that is just not a good solution.
Now im thinking about a server side event. Would that work? I googled about it and it looks good to me. But are there any other things i can try?
It can be simple or complex.
 

DrHam

Forum Veteran
Sep 15, 2015
3,615
4,166
518
Kepler-452b
Like a chat?
Ajax is a nice, simple solution iirc

How would you implement a server side solution for “live changes” without refreshing?

Don’t take my advice as something 101% correct
 

_Oplex_

Dedicated Member
May 5, 2016
694
1,059
198
Under Your Bed (O.o)

Max ♠

Forum Expert
Feb 20, 2016
1,420
2,939
344
26
North pole
Now im thinking about a server side event. Would that work? I googled about it and it looks good to me. But are there any other things i can try?
It can be simple or complex.
SSE seems to be the best option, wouldnt recommend PHP for this however, Node seems like a much better fit

Something janky with ajax could also work, although like you said, not the best option.

There's also a library for SSE in PHP, don't know how well it works, https://github.com/licson0729/libSSE-php
 
  • Like
Reactions: _Oplex_ and DrHam

_Oplex_

Dedicated Member
May 5, 2016
694
1,059
198
Under Your Bed (O.o)
Node seems like a much better fit
Yep, that would be great. but the server i want to host this on has also a mail client on it. I am not that experienced with setting up such thing with ports etc. I am now using socket.io and that is actually what i want. It works fast and easy.

im just making it. and the server would be a problem on a later stage. thx @A Christmas Hangar and @zivdnaL
 
  • Like
Reactions: Max ♠

LazosPlaying

Well-Known Member
Sep 13, 2016
9
9
78
25
Slovenija
aljaxus.eu
Yeah you should use sockets for that. xhr requests are totally not the answer for "live editing" because they open a new connection every time they fire while with sockets you basically have one unclosed connection. Keep us updated on how things go ^-^
 
Members Online

Team online

Latest profile posts

kevin020007 wrote on B4CKROOMS's profile.
Thanks for the follow!
HOTROD the 6th wrote on Daanfkyy's profile.
Congrats on bedrock helper, hope you succeed!
ItzJuan wrote on Marta's profile.
🫡 Thank you for all the hard work you've done. We'll never forget you.
HelmutRebew wrote on Alexp192's profile.
Thanks for the follow!
This place got turned into a graveyard! I didn't cause this, I witnessed this. I have 4 kills and most of them didn't happen here
1780484708293.png
Top Bottom