GWT不受支持的浏览器警告 [英] GWT unsupported browser warning

查看:185
本文介绍了GWT不受支持的浏览器警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示一个消息,不支持的浏览器的用户,而不是让该网站是在一个丑陋的方式失败。

I want to display a message to users with unsupported browsers, as opposed to having the site fail in an ugly manner.

什么是做到这一点的最好办法?

What's the best way to do that?

推荐答案

GWT的团队不提供的不受支持的浏览器中,只有的支持的浏览器的列表,这是一个在那个模糊的名单最新版本的Internet Explorer,Firefox和Safari的。(歌剧,也大部分时间)。

The GWT team does not provide a list of unsupported browsers, only supported browsers, and it's a vague list at that "most recent versions of Internet Explorer, Firefox, and Safari. (Opera, too, most of the time.)".

如果您有什么样的浏览器自己一个好主意/版本将无法正常工作,您可以使用<一个href=\"http://$c$c.google.com/webtoolkit/doc/1.6/DevGuideUserInterface.html#DevGuideCrossBrowserSupport\"相对=nofollow>这code :

If you have a good idea yourself of what browser/version won't work you can use this code:

  public static native String getUserAgent() /*-{
     return navigator.userAgent.toLowerCase();
  }-*/

学习使用什么样的浏览器,也许煮了解决方法。

to learn what browser is being used and perhaps cook up a work-around.

在另一方面,网页浏览器渲染可以在很多微妙的方式,从轻度恼人的灾难性的失败,而且往往是没有办法知道你的网页属于这种规模。一对GWT的主要原因是,你可以不用担心这样的事情。至少直到它发生。

On the other hand, browser rendering of web pages can fail in many subtle ways ranging from mildly annoying to catastrophic, and there is often no way to know where your page falls on that scale. One of the major reasons for GWT is that you can stop worrying about this sort of thing. At least until it happens.

这篇关于GWT不受支持的浏览器警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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