history.pushState in Chrome make favicon request
history.pushState in Chrome make favicon request
Code :
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname +"?"+ queryStr;
window.history.pushState({path:newurl},'',newurl)
当前情况:
每次调用window.history.pushState()
时,图标请求都会迅速发生。它在每次调用此函数时都会发出对网站图标的网络请求。
预期场景 :
网站图标应该只在页面加载时加载一次,我不希望在window.history.pushState()
的每个请求上加载图标。
图标路径在HTML页面中链接如下:
<!-- Favicon -->
<link rel="icon" type="image/png" href="../img/icon/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="../img/icon/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="../img/icon/favicon-96x96.png" sizes="96x96">
它
看起来像Chromium
浏览器中的错误。请参阅此未解决的问题。
但是,如果您使用base64
图像,似乎有一种解决方法,因为href
请求不会发生。
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
看到这个问题。
相关文章:
- Ajax调用ERror Cross Origin REquest:在rails中自动完成大学列表
- https.request ignoring rejectUnauthorized
- Javascript ajax request
- node js post request.body undefined
- 带有Request.Form的JScript数组
- 在http服务单元测试中使用request-js时,chai.request不是一个函数
- 正在发送请求中包含数组的qx.io.request.Xhr请求
- 可以't在Meteor中加载Favicon
- Angular Cross Origin Request CORS失败,但节点http.get()成功返回
- curl post request jquery equivalent
- dojo/request PUT方法dosn'不起作用
- PHP无法检索request.send
- 如何在 jquery post request 中发送api_key和api_secret参数
- webpack-request(jquery)获胜'不起作用
- Ajax-Request:将动态内容传递给模态
- 发送数组 ajax.request 原型
- 在 http 请求中添加事件侦听器 ( request.on ) 是什么意思?而笏就是它的用途
- Angular JS $http request?
- rails jquery ajax request not executing
- history.pushState in Chrome make favicon request