Windows 8准备固定站点 [英] Windows 8 prepare site for pinning

查看:121
本文介绍了Windows 8准备固定站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为Windows 8固定准备我的网站,并且一直在阅读一些有关如何添加各种图像的文档,并且可以弄清楚可以通过使用元数据并根据此上的说明和帮助来完成此操作. ="http://www.buildmypinnedsite.com/" rel ="nofollow noreferrer">网站实际上,我可以构建以下元标记,但是我无法确定在哪里可以调用browserdetect.xml文件.我的文件位于mysitee.com/upload/win8/browserdetetct.xml,图像位于同一文件夹

 <meta name="application-name" content="MySite"/>
<meta name="msapplication-TileColor" content="#2d90c6"/>
<meta name="msapplication-TileColor" content="#2d90c6"/>
<meta name="msapplication-square70x70logo" content="http://placehold.it/70x70/000000/ffffff&text=MySite"/>
<meta name="msapplication-square150x150logo" content="http://placehold.it/150x150/000000/ffffff&text=MySite"/>
<meta name="msapplication-wide310x150logo" content="http://placehold.it/310x150/000000/ffffff&text=MySite"/>
<meta name="msapplication-square310x310logo" content="http://placehold.it/310x310/000000/ffffff&text=MySite"/>
 

请帮忙吗?

解决方案

更新:Windows 10和Windows 10移动版上的Microsoft Edge现在仅使用/browserconfig.xml,因此请停止包含元标记. /p>

我看到Microsoft有点过早地将其向导更新为Windows 8.1.与Windows 8向后不兼容.

您需要的(除了我在另一篇文章中的评论)是带有144x144像素图像的旧代码:

<meta name="msapplication-TileImage" content="/tileimage-144.png" />

这将在Windows 8的Internet Explorer 10中与您已经拥有的两个向后兼容的标签一起使用:

<meta name="application-name" content="MySite" />
<meta name="msapplication-TileColor" content="#2d90c6" />

请注意,除非您的站点实际上是Web应用程序,否则不应使用application-name. (根据HTML5规范.)

您可以在虚拟机中测试Windows 8.1(实际上是Internet Explorer 11). Microsoft正在 http://www.modern.ie上免费分发它们. /en-US/virtualization-tools#downloads

其他增强功能:Internet Explore 11实际上不需要标签出现在文档中.因此,您可以通过在根目录中添加browserconfig.xml(例如example.com/browserconfig.xml)来节省那些不想将站点的带宽固定(从而提高性能)的用户.当用户尝试固定站点并从那里而不是从meta标记加载所需的资源时,IE 11将读取此文件.因此,您要做的是包括IE 10需要的两个/三个标签,然后将新的IE 11标签放入您的浏览器配置文件中.在 http://msdn .microsoft.com/en-us/library/ie/hh772707%28v = vs.85%29.aspx (忽略告诉它包含元标记以加载配置文件的位.只要文件名为browserconfig.xml,它位于您的根目录下,将自动运行.)

使这一切完美无缺: Windows 8不需要在其图像中填充空白,而只需要透明背景即可.但是,Windows 8.1期望1/3的平铺图像对于填充保持透明.如果您不注意填充,您将在其他应用程序中像拇指一样伸出来.

实时示例::我在自己的网站上通过 Slight Future 如果您想要一个可行的示例(从Windows 8.1 Preview 1开始).

最终想法:我不明白为什么Microsoft必须为Internet Explorer/Windows的每个单独版本引入一些新功能.没有什么是向后兼容的.对于IE 9/10和Windows 7/8桌面任务栏上的固定站点,您需要一个四个不同大小的网站图标.

I would like to prepare my site for windows 8 pinning and have been reading some documentation on how to add the various images and could figure out that it could be done by using metadata and according to instructions and help on this site I could actually build the following meta tags but i couldn't figure out where I can call the browserdetect.xml file assuming I have the file located at mysitee.com/upload/win8/browserdetetct.xml and the images in the same folder

<meta name="application-name" content="MySite"/>
<meta name="msapplication-TileColor" content="#2d90c6"/>
<meta name="msapplication-TileColor" content="#2d90c6"/>
<meta name="msapplication-square70x70logo" content="http://placehold.it/70x70/000000/ffffff&text=MySite"/>
<meta name="msapplication-square150x150logo" content="http://placehold.it/150x150/000000/ffffff&text=MySite"/>
<meta name="msapplication-wide310x150logo" content="http://placehold.it/310x150/000000/ffffff&text=MySite"/>
<meta name="msapplication-square310x310logo" content="http://placehold.it/310x310/000000/ffffff&text=MySite"/>

Any help please ?

解决方案

Update: Microsoft Edge on Windows 10 and Windows 10 Mobile now only uses /browserconfig.xml, so stop including meta tags.

I see that Microsoft has — a bit prematurley — updated their wizard to Windows 8.1. Which is not backwards compatible with Windows 8.

What you need (in addition to my comments in the other post) is the older code with a 144x144 px image:

<meta name="msapplication-TileImage" content="/tileimage-144.png" />

That will work in Internet Explorer 10 on Windows 8 in conjunction with the two backwards compatible tags you already have:

<meta name="application-name" content="MySite" />
<meta name="msapplication-TileColor" content="#2d90c6" />

Note that you should not use application-name unless your site is actually a web application. (Per the HTML5 specs.)

You can test the Windows 8.1 (Internet Explore 11, actually) stuff in a virtual machine. Microsoft is handing them out for free over at http://www.modern.ie/en-US/virtualization-tools#downloads

Further enhancements: Internet Explore 11 does not actually need the tags to be present in the document. so you can save users who do not intend to pin your site the bandwidth (thus gaining performance) by including a browserconfig.xml in your root (eg. example.com/browserconfig.xml). IE 11 will read this file when a user tries to pin a site and load the resources needed from there instead of from the meta tags. So what you do is include the two/three tags IE 10 needs, and put the new IE 11 tags in your browser config file. Read up on http://msdn.microsoft.com/en-us/library/ie/hh772707%28v=vs.85%29.aspx (ignore the bits where it tells you to include a meta tag to load the config file. As long as the file name is browserconfig.xml and it is on your root, it will automagically work.)

Making it all darn perfect: Windows 8 requires no padding in their image, only a transparent background. Windows 8.1, however, expect ⅕ of the tile images to be left transparent for padding. You will stick out like a sore thumb amongst the other applications if you do not pay attention to the padding.

Live example: I implemented this on my own site over at Slight Future if you want an working (as of the Windows 8.1 Preview 1) example.

Final thoughts: Why Microsoft have to introduce something new for every single version of Internet Explorer / Windows, I can’t understand. Nothing is backwards compatible. For IE 9 / 10 and pinned sites on the Windows 7 / 8 desktop taskbar, you need a favicon in four different sizes.

这篇关于Windows 8准备固定站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆