Webserver with ESP8266 - Chrome sends 2 request!?!?

Hi guys;

I'm programming a webserver with ESP8266 and Arduino. I found that when connecting to it using Chrome I have 2 request (and the second without data), while with other browsers I get only one. This is a little bit disturbing.

Do you know how to solve it? It is giving me some problems because the client connection doesn't close propperly...

Examples of what I get with "one" connection to the webserver:

with other browsers, i.e. Microsoft edge:

[WiFiEsp] New client 0
GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, image/jxr, */*
Accept-Language: es-ES,es;q=0.5
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
Accept-Encoding: gzip, deflate
Host: 192.168.1.103
Connection: Keep-Alive

[WiFiEsp] Disconnecting  0
Client disconnected

with chrome:

[WiFiEsp] New client 0
GET / HTTP/1.1
Host: 192.168.1.103
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: http://192.168.1.103/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en,es;q=0.8,zh-CN;q=0.6,zh;q=0.4

[WiFiEsp] Disconnecting  0
Client disconnected
[WiFiEsp] New client 0
GET /favicon.ico HTTP/1.1
Host: 19	b¥­•�Gecko) Chrome/54.0.2840.71 Safari/537.36
Accept: */*
Referer: http://192.168.1.103/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en,es;q=0.8,zh-CN;q=0.6,zh;q=0.4

[WiFiEsp] Disconnecting  0
Client disconnected
[WiFiEsp] New client 0
[WiFiEsp] TIMEOUT: 112

One request is for the page, and the second is for the favicon.ico file. That is the little icon in the web browser's tab.

Thanks SurferTim. It is possible to detect that the browser is chrome to somehow avoid the second request?

Each web browser sends a request for the favicon.ico file at different times. Firefox sends a request for the icon every request. Chrome sends a request for it once each session. You must deal with that on your (the server's) end.