如何强制网站图标刷新?

时光总嘲笑我的痴心妄想 提交于 2020-08-08 15:40:57

问题:

I have a Grails application running locally using its own tomcat and I have just changed the favicon for a new one. 我有一个Grails应用程序,它使用自己的tomcat在本地运行,而我刚刚将图标图标更改为一个新图标。 Problem is that I can not see it in any browser. 问题是我无法在任何浏览器中看到它。 The old favicon shows up or I get no favicon at all, but not my new one. 出现旧的收藏夹图标,或者我什么都没有得到,但是我的新收藏夹没有。 I do not think this is a Grails issue per se, more an issue with favicons. 我认为这本身不是Grails的问题,更多的是网站图标的问题。

What is supposed to happen with favicons? 网站图标应该发生什么? How are they supposed to work? 他们应该如何工作? I have numerous bookmarks in my browser which have the wrong icons and they never seem to get refreshed. 我的浏览器中有很多书签,这些书签的图标错误,它们似乎从未刷新过。 How do I force the server/browser to stop caching them? 如何强制服务器/浏览器停止缓存它们? It seems pretty silly to always cache them given they are normally only 16x16. 鉴于通常只有16x16,总是缓存它们似乎很愚蠢。 Why not just upload them with every visit to the page? 为什么不随页面访问一起上传它们呢? It is not exactly a huge overhead. 这并不是一个巨大的开销。


解决方案:

参考一: https://stackoom.com/question/9Gdx/如何强制网站图标刷新
参考二: https://oldbug.net/q/9Gdx/How-do-I-force-a-favicon-refresh
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!