English 中文(简体)
页: 1
原标题:Apple touch icon isn t showing up on the home screen

I m using the following code to get touch icons for mobile devices - it s based on the html5boilerplate/mobile example:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">

<!-- For iPhone 4 with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/touch/h/apple-touch-icon.png">
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="/img/touch/l/apple-touch-icon.png">
<!-- For nokia devices: -->
<link rel="shortcut icon" href="/img/touch/apple-touch-icon.png">

<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

但是,出于某种原因,Peter仍在给我带来家庭屏幕icon的问题。 我听到的是,一只听觉。

我在这里包括其他 met子,如果它们能说明为什么不工作。 我试图重新排列两面。

Can anyone think of anything that might stop the icons being used?

我把html5个碎块/移动式作为试验案例——Im能够浏览到他们的现场,在我的Pi4(SOS 5)的家屏幕上添加icon。 我试图将自己的法典、文件夹结构以及信条复制到我自己的地点,但这只是 t。

任何想法?

最佳回答

我将同一页和icon放在另外两个地点,而且它完全运作,因此,我认为可能是因为我所工作的原两个测试服务器是密码保护的——尽管我显然已进入全权证书,以浏览该页,因此不能完全肯定为什么会成为一个问题。 然而,结果似乎表明了这一点。

问题回答

我有同样的问题。 解决办法是取消网站的密码保护。

I had the very same problem, and the source of the problem is that I had an htaccess file with password protection for my site, so the webclip icon will not work, to solve this problem and still have password protection you need to add this code:

SetEnvIf Request_URI "(/apple-touch-icon.png)$" allow
Order allow,deny
Allow from env=allow
Satisfy any

http://www.example.com/apple-touch-icon.png” 无需任何密码。

如果你在此仍有问题,那么完整存取文件就是一例:

AuthUserFile /home/mysite/.htpasswds/.htpasswd
AuthType Basic
AuthName "Password Protected"
Require valid-user
SetEnvIf Request_URI "(/apple-touch-icon.png)$" allow
Order allow,deny
Allow from env=allow
Satisfy any

这应当解决这个问题。

!

http://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html”rel=“noreferer” 他们建议在“纸面文件夹”中贴上ic。

To specify an icon for the entire website (every page on the website), place an icon file in PNG format in the root document folder called apple-touch-icon.png or apple-touch-icon-precomposed.png.

I tried this and it wouldn t work until I finally moved the icons to an img folder and linked to them there.

然而,我怀疑第html5艘轮船装板icon和你的 did子之所以工作,是因为你正在使用虚拟目录,例如:

http://localhost/myvirtualdirectory/apple-touch-icon.png

while the default behavior of iOS is to look at the root domain even when you are hosting out of the virtual directory:

http://localhost/apple-touch-icon.png

希望其他人能够证实这一点。

当我的神职人员身边时,我也存在同样的问题,尽管我的遗址是保护的密码。 在把他们移到我的根子(清除海滩)之后,它开始工作。

把外观图像托管和增加陶瓷作为“红利”的价值,对我来说是一种杂质。

I couldn t get this to work until I went on my iPhone under Settings->Safari and then Clear History and Website Data and then try and add it to my homepage.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签