0

I want to know that is there anything that check backend for data if it is changed or not. If the data is changed then it will update frontend also without reloading the page, without any click or some event or without using setInterval method (Javascript). Please help. (Note: I am using Django as backend framework.)

Sky Verma
  • 9
  • 2
  • 6
  • Does this answer your question? [Realtime web programming: how does it work?](https://stackoverflow.com/questions/22056578/realtime-web-programming-how-does-it-work) – Haroldo_OK Jul 22 '21 at 10:03

1 Answers1

1

No, there's no magical "something" that didn't involve frontend code such as (e.g.; there are other options, surely)

  • polling the backend periodically using setInterval
  • opening a server-sent events connection to the backend
  • opening a websocket to the backend (using e.g. Django channels)
AKX
  • 152,115
  • 15
  • 115
  • 172
  • Yes I can use websocket but I don't know how to use them. I tried to learn that but was not successful. Can anyone teach me? – Sky Verma Jul 22 '21 at 10:06
  • 1
    I'm sure someone can teach you, but you're better off trying to learn by yourself (or e.g. purchasing access to a course?) and asking questions where you're stuck. – AKX Jul 22 '21 at 10:08