first etthernet shield try example

hello,

just got the ehternet shield module…

i copied an example out of the arduino cookbook…

when accesing the webpage programmed in the example, it should show the http header only once, but for some reason , it does it twice… Any idea??

Also is the mac adress needed??

Thanks

WebServer_28_1_2015.ino (2.64 KB)

Kurtwerbrouck: when accesing the webpage programmed in the example, it should show the http header only once, but for some reason , it does it twice... Any idea??

Yes, that is absolutely normal with modern webbrowsers.

Modern webbrowsers not only reqest the initial page:

GET / HTTP/1.1

But they also try to request a file named "favicon.ico":

GET /favicon.ico HTTP/1.1

On a real website this would be the "website icon", such as you can normally see in the upper left corner of your webbrowser. Here on arduino.cc you should see an Arduino icon on your browser tab.

If you create an arduino webbrowser, you can either scan for the actual GET request and if the file requested is favicon.ico you could either send icon data or an "Error 404 - not found" reply.

Kurtwerbrouck: Also is the mac adress needed??

Yes, every device in a network must have a MAC address, and this address must be unique in your local network. So if you will use a second Arduino device in your network, you must use a different MAC address for each one.