gpt4 book ai didi

angularjs - Favicon 没有第一次出现

转载 作者:行者123 更新时间:2023-12-04 18:05:28 26 4
gpt4 key购买 nike

我已经构建了一个 AngularJS 单页应用程序并且它工作正常,但它有一个问题:当网站第一次加载时,网站图标没有出现。如果我重新加载页面,它最终会显示出来。它在我测试过的每个网络浏览器上都一样:Mozilla Firefox、Chrome、Chromium、IE 9、Android 浏览器、Safari for iPhone。

这是 SPA 的共同部分:

<!DOCTYPE html>
<html lang="en" data-ng-app="vannApp" >
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="Vanntile Ianito" name="author">
<base href="file:///home/vanntile/Documents/doc/WEB_DEVELOPING/Vann_Original/index.html">

<link rel="shortcut icon" href="icon/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="icon/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="icon/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="icon/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="icon/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="icon/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="icon/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="icon/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="icon/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="icon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="icon/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="icon/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="icon/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="icon/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="icon/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="icon/manifest.json">

<title>Website Title</title>

<link href="css/vannstyle.min.css" rel="stylesheet">
<script src="js/angular/angular.min.js"></script>
<script src="js/angular/ui-bootstrap-tpls-0.12.1.min.js"></script>
<script src="js/angular/angular-route.min.js"></script>
<script src="js/angular/angular-animate.min.js"></script>
<script src="js/angular/index.js"></script>

</head>
<body>
<p>This is some text. I could have thought of something better, but I'm lazy.</p>
</body>
</html>

网站图标是用 Real favicon Generator 制作的. Microsoft 磁贴由以下 Material 制成: Windows 8.1 tile .它们不在网站的根目录中,而是在 中/icon .

任何帮助,将不胜感激。先感谢您。

最佳答案

你肯定把 favicon.ico 元标记第一个来自 favicon 元标记。以谷歌页面为例:

<!DOCTYPE html>
<html lang="en" data-ng-app="vannApp" >
<head>
<meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image">
<link href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut icon">

关于angularjs - Favicon 没有第一次出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29713360/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com