Help with WiFi 101 tutorial

I'm following along with MKR1000 WiFi Robot | Arduino Project Hub

I've made a few modifications in order to control some motors through the MKR Motor Carrier board. I noticed that when you click a button the browser will connect twice. Here is the log:

new client //THE BROWSER FIRST CONNECTS HERE
GET /?STEP HTTP/1.1
Host: 10.0.0.8
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://10.0.0.8/?STEP
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9


Run motor for small step //I PUSH THE BUTTON HERE

M1.setDuty(100) for 50ms //THE MOTOR RUNS
M1.setDuty(0) //THE MOTOR STOPS
client disconnected //THE CLIENT DISCONNECTS
new client // FOR SOME REASON IT RECONNECTS HERE AND DOES IT AGAIN?
GET /favicon.ico HTTP/1.1
Host: 10.0.0.8
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: image/webp,image/apng,image/*,*/*;q=0.8
Referer: http://10.0.0.8/?STEP
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
DNT: 1
AlexaToolbar-ALX_NS_PH: AlexaToolbar/alx-4.0.3


Run motor for small step

M1.setDuty(100) for 50ms
M1.setDuty(0)
client disconnected

I must be missing something about how browsers interact with websites, but why it is doing this is beyond me.

Any help at all would be so appreciated!!

Thanks!

Hi @malk0lm,

Your browser is sending a HTTP GET request for /favicon.ico:

GET /favicon.ico HTTP/1.1

I suggest you change the sketch to filter out the path in the GET request.