I have the following simple http-server setup using node.js:
var http = require('http'); var port = 12311 http.createServer(function (req, res) { console.log("Incomming request from " + req.connection.remoteAddress); res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end("test string"); }).listen(port); console.log("Listening on " + port); As you can see, when a request comes in, I log it to the console. Now when I browse to localhost:12311 the console shows that two connections have come in:
"E:\Program Files\nodejs\node.exe" hello-world-server.js Listening on 12311 Incomming request from 127.0.0.1 Incomming request from 127.0.0.1 Why is this?
req.urland guess what? It shows a request for favicon.ico. I guess I wast to fast to ask :)