【发布时间】:2014-02-27 12:18:52
【问题描述】:
目前我正在尝试在我的 Meteor 应用中构建一个页面,让用户知道他们的浏览器不受支持。
问题是我的 Meteor 应用程序似乎根本无法在 IE6-9 上加载。我只是得到一个空白页。
我想要的是,在一切开始之前,如果我可以将他们定向到一个静态站点,告诉他们他们的浏览器不可用。
这是我所拥有的,但它似乎不起作用
layout.html 页面
<template name="layout">
{{#if isOldBrowser }}
{{> upgradeBrowser}}
{{else}}
<div class="{{iif currentUser 'padded' 'padded-top'}}">
{{#unless getConfigSetting 'showLandingPageOnly' false}}
{{> layoutNavbar }}
{{> layoutConnectionStatus }}
{{/unless}}
{{> loginDialog }}
{{> feedbackDialog }}
{{> teamNameDialog }}
{{> teamTimeDialog }}
{{> teamAddParticipantDialog }}
{{> teamEditParticipantDialog }}
{{yield}}
</div>
{{/if}}
我的全球车把
Handlebars.registerHelper 'isOldBrowser', () ->
BrowserDetect.browser == 'Explorer' && BrowserDetect.version < 10
我的升级浏览器模板
<template name="upgradeBrowser">
<h1>Sorry mate! Your browser is a bit ancient! Try upgrading to <a href="www.google.com/chrome">Chrome</a></h1>
</template>
PS - 我也可能只是提到我只使用 IE11 内置的开发人员工具中的文档模式设置。它可能会发生它可能会起作用,但我真的没有任何方法来测试它,因为我没有旧版本 IE 的实例
【问题讨论】:
标签: javascript internet-explorer meteor compatibility