On 2013-09-17, at 18:24 , Gonçalo Diogo Bessa wrote:
> I have a problem with chrome navigator. I created the server below, but the 
> chrome make two request. Has anyone had this type of problem?
> 
> PS: To port 80 to work, you must be root.
> 
> 
> var http = require("http");
> var express = require('express'), app = express();
> 
> app.use(app.router);
> app.use(express.static(__dirname));
> app.get('*', function(req, res){
>     console.log(req.params);
> });
> 
> http.createServer(app).listen(80);
> 
> 
> Exemple:
> http://localhost/1234       -> OK
> http://localhost/12A12     -> Been two requests
> http://localhost/12A23d   -> Been two requests

Hi Bessa,

Is one of the requests for the favicon by any chance? Most browsers 
automatically make this extra request, so that they can show a small icon to 
the left of the url navigation field.  If so, this might help you:

<https://gist.github.com/kentbrew/763822>

Cheers,

James

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to