关于favicon.ico

问题:经常在控制台遇到这样的报错 "Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico"

解决:在head中引入<link rel="icon" href="/favicon.ico" />

什么是favicon.ico ? :打开一个网页,显示在浏览器地址栏左侧的图标,这个就是favicon.ico。一般是16x16或者32x32.太大了会影响加载速度。因为有缓存,所以在更新后需清除浏览器缓存

猜你喜欢

转载自blog.csdn.net/qq_42269433/article/details/87608205