Quantcast
Channel: CNode:Node.js专业中文社区
Viewing all articles
Browse latest Browse all 14821

chrome为什么每次请求都会附带一个favicon请求?

$
0
0
var http = require("http");
var url = require("url");
http.createServer(function(req,res){
	console.log(req.method);
	console.log(req.url);
        console.log(req.headers);
 
	res.writeHead(200,{"Content-Type":"text/html"});
	res.end("<a href='/some' >some</a>");

}).listen(80,"127.0.0.1");
console.log("server is runing");

分别用firefox/chrome访问 htttp://localhost chrome每个url请求都会附加一个favicon 而firefox只有第一次会发favicon,后续的请求只请求对应的url 按理说,favicon应该改动不是很频繁


Viewing all articles
Browse latest Browse all 14821

Trending Articles