在Windows 8中将用户重定向到桌面浏览器 [英] Redirect user to desktop browser in windows 8
问题描述
有没有办法强制或提示用户使用Windows 8桌面浏览器,如果他们用Windows 8 RT浏览器打我的网页?我希望能够使用像Silverlight这样的插件。
是的,您可以提示用户切换到桌面版本。微软将此作为对需要它的网站的回退。 (但不能与JavaScript)
http://blogs.msdn.com/b/ie/archive/2012/01/31/web-sites-and- a-plug-in-free-web.aspx
需要插件的网站的开发人员可以使用HTTP标头或
元标记来指示Metro风格的Internet Explorer来提示用户。
HTTP头
$ b
X-UA兼容:requireActiveX = true
META标记
< meta http-equiv =X-UA-Compatiblecontent =requiresActiveX = true/>
$ b < Metro风格IE10检测这些标志,并向消费者提供
的一键选项,以切换到桌面上的IE10:
微软强烈鼓励我们转向HTM5免费插件世界。这种情况是否会发生还有待观察,但如果将来使用插件越来越困难,我不会感到惊讶。它们是大量安全漏洞的来源。
从长远来看,最好在代码中使用插件。考虑到Android,IOS和其他平板电脑和手机的过多,这是有道理的。跨平台网站开发从未像现在这样重要,我敢打赌这将继续成为潮流。
Is there a way to force or prompt a user to use the windows 8 desktop browser if they hit my web page with the windows 8 RT browser? I want to be able to use plugins like Silverlight.
Yes, you can prompt users to switch to the Desktop version. Microsoft added this as a fallback for sites that need it. (But not with JavaScript)
http://blogs.msdn.com/b/ie/archive/2012/01/31/web-sites-and-a-plug-in-free-web.aspx
Developers with sites that need plug-ins can use an HTTP header or meta tag to signal Metro style Internet Explorer to prompt the user.
HTTP Header
X-UA-Compatible: requiresActiveX=true
META Tag
<meta http-equiv="X-UA-Compatible" content="requiresActiveX=true" />
Metro style IE10 detects these flags, and provides the consumer a one-touch option to switch to IE10 on the desktop:
Microsoft is strongly encouraging us, however, to move to an HTM5 plug-in free world. Whether that happens or not remains to be seen, but it wouldn't surprise me if they made it harder and harder to use plug-ins in the future. They're the source of plenty of security holes.
So long-term, it might be better to start eliminating the use of plug-ins in your code. That makes sense considering the plethora of Android, IOS, and other tablets and phones out there. Cross-platform web development has never been more important than it is now, and I'm betting that will continue to be the trend.
这篇关于在Windows 8中将用户重定向到桌面浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!