Search found 2 matches

by esplover
Wed Sep 22, 2021 2:40 am
Forum: ESP32 Arduino
Topic: is websocket better or setInterval http request better?
Replies: 3
Views: 3017

Re: is websocket better or setInterval http request better?

What's your use case? Do you simply want to have a browser open looking at the webpage, or do you have further automation in mind? Any other things? Generally, sending the status continuously is a bit wasteful... you can't really do anything else if you use Javascript to refresh a page, but if you ...
by esplover
Tue Sep 21, 2021 4:57 pm
Forum: ESP32 Arduino
Topic: is websocket better or setInterval http request better?
Replies: 3
Views: 3017

is websocket better or setInterval http request better?

I am building a wifi PIR system. When the PIR is triggered it will send the positive value to a site served on the esp32 server. I have thought of 2 ways for this to work 1) Use a websocket to constantly trasmit data of PIR status (HIGH or LOW) 2) Build the HTML page served by the esp32 server and u...