Search found 2 matches
- Fri Feb 22, 2019 10:11 am
- Forum: ESP32 Arduino
- Topic: how to redirect to root after click on button - Arduino IDE + ESP32 Webserver
- Replies: 1
- Views: 7969
Re: how to redirect to root after click on button - Arduino IDE + ESP32 Webserver
Solved: Just needed to add client.print("<HEAD>"); client.print("<meta http-equiv=\"refresh\" content=\"0;url=/\">"); client.print("</head>"); for every button press, like below: // turns the GPIOs on and off if (header.indexOf("GET /26/on") >= 0) { output26State = "on"; digitalWrite(output26, HIGH)...
- Fri Feb 22, 2019 8:58 am
- Forum: ESP32 Arduino
- Topic: how to redirect to root after click on button - Arduino IDE + ESP32 Webserver
- Replies: 1
- Views: 7969
how to redirect to root after click on button - Arduino IDE + ESP32 Webserver
Hi! I'm trying to use ESP32 + Arduino IDE to control a relay. I've started by using the library and the code below. The problem I'm having: after clicking on the button and activating the pin, if the browser is left like this, and then the page gets refreshed by mistake, the action will be repeated....