JS启用了多少个浏览器? [英] How many browsers JS enabled?

查看:68
本文介绍了JS启用了多少个浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我表示有兴趣将我对HTML和CSS的新知识扩展到JavaScript的野外领域后,我被告知要避免使用它是明智之举

它,因为并非所有浏览器都使用它或者能够读取它。在网上搜索其他意见之后,我发现有人估计目前可以读取JS的浏览器的浏览器频率优于90% - 那就是

对我来说当然是可行的!


你们这个好人有没有关于这个问题的想法或参考?


- ---------

困惑。 。 。

After expressing my interest in expanding my new knowledge of HTML and CSS
into the wild realm of JavaScript, I was advised that it is wiser to avoid
it, since not all browsers are use it or are enabled to read it. After
searching for other opinions on the web, I found that some estimate that the
frequency of browsers that can read JS currently is better than 90% -- that
is certainly workable for me!

Do you good people have any thoughts or references on the issue?

----------
confused . . .

推荐答案

" confused" <无***** @ hotmail.com>写道:
"confused" <no*****@hotmail.com> writes:
在表达了我对将HTML和CSS的新知识扩展到JavaScript的野外领域的兴趣之后,我被告知要避免使用
它,因为并非所有浏览器都使用它或者能够读取它。


那个(显然)不是这个群体普遍分享的情绪。

明智地使用它是明智的:)

在网上搜索其他意见后,我发现有些
估计目前可以阅读JS的浏览器的频率优于90% - 这对我来说当然可行!


统计数据通常会将没有Javascript的浏览器数量(缺少能力或许可)放在10%或者略高于10%。


这些可以是用户禁用Javascript的当前浏览器,或

受限制的浏览器,没有Javascript功能。我知道没有

统计数据将Javascript的缺乏与浏览器类型联系起来。

你们这些人对这个问题有什么想法或参考吗?
After expressing my interest in expanding my new knowledge of HTML and CSS
into the wild realm of JavaScript, I was advised that it is wiser to avoid
it, since not all browsers are use it or are enabled to read it.
That''s (obviously) not a sentiment that is generally shared by this group.
It is wiser to use it wisely :)
After searching for other opinions on the web, I found that some
estimate that the frequency of browsers that can read JS currently
is better than 90% -- that is certainly workable for me!
The statistics usually put the number of browsers without Javascript
(either lacking capability or permission) at, or just above, 10%.

These can be current browsers with Javascript disabled by the user, or
restricted browsers with no Javascript capability. I know of no
statistics that couples the lack of Javascript with browser type.
Do you good people have any thoughts or references on the issue?




10%是很多人。结论必须是如果页面

*可以*在没有Javascript的情况下工作,一个好的网页设计师将确保

它确实有效,从而不会人为地减少可能的用户通过

10%。对于商业网站,根据Javascript可能会将b
直接转换为网站收入下降10%。

这将是......不明智的。


但是,重要的是要记住解决问题的方法是

不要完全省略Javascript。它仍然可以用来使

功能页面更好地工作。典型的非必要用法是

图形效果(例如,当鼠标悬停在它们上方时,更改按钮图形),验证用户输入(保存往返到

服务器发生错误,不要替换服务器端验证),

并且通常会对页面进行更改,否则可能是
通过获取新页面实现。


错误的设置包括:

- 使用javascript :链接。这些仅适用于启用javascript。

- 使用非链接元素与javascript而不是链接。

- 制作仅适用于Javascript的导航辅助工具(例如,下拉

没有默认动作的菜单)

- 用基于javascript的实现替换nativ表单控件

(例如,一个更漂亮的下拉框代替选择元素)。

- 滚动条同上。


FAQ中的答案(< URL:http://jibbering.com/faq />)基于

这种方法:使Javascript使用页面优雅地降低非支持
启用Javascript的浏览器。


我所说的是用于互联网页面。如果您知道用户使用的是什么浏览器和配置,那么您可以做出假设。

这通常只适用于公司网络。


祝你好运

/ L

-

Lasse Reichstein Nielsen - lr*@hotpop.com

DHTML死亡颜色:< URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>

''没有判断的信仰只会降低精神神圣。''



10% is quite a lot of people. The conclusion must be that if the page
*can* work without Javascript, a good web designer will make sure that
it does work, thereby not artificially reducing the possible users by
10%. For a commercial web site, depending on Javascript can possibly
be directly translated into a 10% drop in earnings from the web site.
That would be ... unwise.

However, it is important to remember that the cure to the problem is
not to omit Javascript completely. It can still be used to make a
functioning page work better. Typical non-essential usages are
graphical effects (e.g., change graphics of buttons when the mouse
hoovers above them), validation of user input (to save a roundtrip to
the server in case of errors, not to replace server side validation),
and generally to make changes to the page that can otherwise be
achieved by fetcing a new page.

Bad desings include:
- using javascript: links. These only work with javascript enabled.
- use non-link elements with javascript instead of links.
- make navigational aids that only work with Javascript (e.g., drop down
menus with no default action)
- replace nativ form controls with javascript based implementations
(e.g., a "prettier" drop down boxes instead of select elements).
- ditto for scroll bars.

The answers in the FAQ (<URL:http://jibbering.com/faq/>) are based on
this approach: make Javascript using pages degrade gracefully on non-
Javascript enabled browsers.

What I have said is meant for internet pages. If you know what browser
and configuration your users are using, then you can make assumptions.
This generally only holds for corporate networks.

Good luck
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
''Faith without judgement merely degrades the spirit divine.''


>表达了我对扩展新知识的兴趣
>After expressing my interest in expanding my new knowledge
HTML和CSS进入了JavaScript的野外领域,我被告知要避免它更明智,因为并非所有浏览器都使用它或者能够读取它。在网上搜索其他意见后,我发现有人估计目前可以阅读JS的浏览器的频率比90%更好 - 这对我来说当然是可行的!

好人们对
问题有什么想法或参考吗?
of HTML and CSS into the wild realm of JavaScript, I was
advised that it is wiser to avoid it, since not all browsers are
use it or are enabled to read it. After searching for other
opinions on the web, I found that some estimate that the
frequency of browsers that can read JS currently is better
than 90% -- that is certainly workable for me!

Do you good people have any thoughts or references on the
issue?




除了/ L'的内容丰富的回复,这是另一个问题,你应该在决定将Javascript合并到你的网页时考虑
。很多

" professional"网站在他们的网站上有很多引人注目的DHTML和Javascript

技巧。对于那些有残疾的人来说,这不一定是好事。虽然有严重残疾的用户数量可能很小,但是很少有人可能会产生重大的后果。


我会在1997年的几个新闻组中引用你的讨论。

http://groups.google.com

搜索词:

澳大利亚网页设计师组:comp.lang.javascript


这是关于澳大利亚残疾歧视的一个相当冗长的主题

法案以及互联网如何受其影响。虽然这项法案特别适用于澳大利亚,但在美国有一些案例,公司已经被残疾人起诉,声称他们公司的网站不是

根据ADA可访问。我不知道有任何成功的诉讼,但是

花在辩护案件上的时间和金钱可以更好地用于学习如何设计无障碍网页。首先避免整个问题。

http://www.hreoc.gov.au/disability_r...w_3/www_3.html


此链接指向上述主题中提到的法案。


Peace,Vm

Yaz


提供复杂的解决自1997年以来的简单问题。



Aside from /L''s informative reply, here is another issue which you should
consider when deciding to incorporate Javascript into your web page. Many
"professional" web sites have plenty of eye catching DHTML and Javascript
tricks in their site. For those with disabilites, this is not necessarily a
good thing. While the number of users with significant disabilities which may
prevent them from using a site may be small, those few people can have major
consequences.

I''ll refer to you a discussion in several newsgroups which took place in 1997.

http://groups.google.com
Search term :
Australian web designers group:comp.lang.javascript

It''s a rather lengthy thread concerning Australia''s Disability Discrimination
Act and how the internet is affected by it. While this Act is particular to
Australia, there have been cases in the United States where companies have been
sued by those with disabilities claiming their company''s websites were not
accessible under the ADA. I''m not aware of any successful lawsuits, however
the time and money spent defending their case could have been better spent on
learning how to design accessible web pages; avoiding the whole problem in the
first place.

http://www.hreoc.gov.au/disability_r...w_3/www_3.html

This link points to the Act mentioned in the above thread.

Peace, Vm
Yaz

Providing complicated solutions to simple problems since 1997.


confused写道:
confused wrote:
表达了我对扩展HTML新知识和CSS的兴趣进入JavaScript的狂野境界,我被告知要避免使用它是明智的,因为并非所有浏览器都使用它或启用它来阅读它。


很多遇到网页不合适或者b
考虑不当使用javascript的人对

造成了灾难性的后果页面(一个空白页面是最明显和最极端的结果)

得出的结论是javascript全是坏的并且建议它永远不会被任何人使用




显然,这不是一种你会在这里得到提升的态度。

但是,呈现一个空白屏幕或网页的网站用户
$ b由于任何其他原因而无法使用的$ b,这也不是一种被认为可以接受的做法(除了少数几个,不是...... b $ b能够做任何事情)更好)。


我们挣扎的问题是:可以设计javascript,实现和部署
以增强网站的可用性和

功能不会影响100%可靠的HTML over HTTP

是任何网站的基础。

在网上搜索其他意见后,我发现有些人估计可以阅读JS的浏览器的频率目前优于90% -
< snip>


javascript的可用性不是唯一的问题。另外你要
必须考虑你打算做的事情的可行性

javascript。


打开新的浏览器windows就是一个明显的例子。由于弹出广告

广告人们运行各种风格的弹出窗口拦截器。这些人

吃了没有使用javascript禁用/无法使用的弹出窗口拦截器

浏览器,因为那些浏览器无法打开就没有意义

无论如何都是弹出窗口。因此,对于任何脚本的假设10%失败,由于javascript被禁用,

试图打开一个新窗口

你还必须添加一个百分比积累的效果

各种形式的弹出窗口拦截器。


然后就是浏览器的动态性问题。现代桌面

浏览器非常动态,小型嵌入式浏览器和旧版浏览器

则不那么重要。因此,想要在

网页中主动插入内容的脚本将在启用javascript的情况下失败,并且除了无法使用javascript的浏览器之外,

的浏览器也不会是动态的。 />

即使像使用IE的写入

剪贴板的能力一样微不足道也无法保证可用,因为IE的配置允许

要独立禁用。而且ActiveX的可靠性更低。


Javascript无法以javascript为客户端或无客户可用的态度编写。 javascript的可用性没有

保证任何给定的脚本都能成功执行,这将完全取决于它将要尝试做什么,以及它如何

尝试这样做。所以,即使你容易相信这可以收集关于全球

HTTP网络的准确和有代表性的统计数据,但是任何javascript可用性的统计数据都只代表

成功脚本之间非常模糊的边界区域的一端

执行和脚本失败。

这对我来说当然是可行的!
After expressing my interest in expanding my new knowledge of HTML
and CSS into the wild realm of JavaScript, I was advised that it is
wiser to avoid it, since not all browsers are use it or are enabled
to read it.
Many people who encounter web pages where the inappropriate or
ill-considered use of javascript has had disastrous consequences for the
page (a blank page being the most obvious and extreme consequence)
conclude that javascript is all bad and recommend that it is never used
by anyone.

Obviously that is not an attitude that you will find promoted here.
However, presenting a web site user with a blank screen, or a web page
that is unusable for any other reason, is not an practice that is
considered acceptable here either (except maybe by a few, who are not
capable of doing any better).

The question we struggle with is: can javascript be designed,
implemented and deployed to enhance a web site wen it is available and
functional without detracting from the 100% reliable HTML over HTTP that
is the basis for any web site.
After searching for other opinions on the web, I found
that some estimate that the frequency of browsers that can read JS
currently is better than 90% -- <snip>

The availability of javascript is not the only issue. In addition you
have to consider the viability of the things that you intend to do with
javascript.

Opening new browser windows is an obvious example. Because of pop-up
advertising people run various flavours of pop-up blocker. These people
ate not using pop-up blockers with javascript disabled/incapable
browsers, there would be no point as those browsers could not open
pop-ups anyway. So to your supposed 10% failure of any script that
attempts to open a new window as a result of javascript being disabled
you also have to add a percentage resulting from the accumulated effect
of the various forms of pop-up blockers.

Then there is the question of how dynamic the browser is. Modern desktop
browsers are very dynamic, small embedded browsers and older browsers
are less so. So a script that wants to actively insert content into a
web page will fail on javascript enabled and capable browsers that are
not dynamic in addition to javascript incapable browsers.

Even something as trivial as using IE''s ability to write to the
clipboard is not guaranteed to be available as IE''s configurations allow
that to be independently disable. And ActiveX is even less reliable.

Javascript cannot be written with an attitude that javascript is either
available on the client or not. The availability of javascript does not
guarantee that any given script will execute successfully, that will
depend entirely on what it is going to be attempting to do, and how it
attempts to do it. So, even if you are gullible enough to believe that
accurate and representative statistics can be gathered about a global
HTTP network, any statistic for javascript availability only represents
one end of a very blurred boundary region between successful script
execution and script failure.
that is certainly workable for me!




如果你去了一个网站背后的商界人士(假设它是一个商业项目)并且告诉他们任意且不必要的

设计决定将花费他们营业额的10%,你能否b / b预计该决定会被认可?


一个起点网站是HTML over HTTP(通常在

与服务器端脚本的组合中),这是100%可靠的,并且将b $ b工作在每个网络浏览器上为所有用户(或至少接近那个

)可以实现。所有损害了100%可靠性的可靠性是由人类做出的设计决策的直接结果(它不是系统中固有的)。


人类引入不可靠性的方式和原因各不相同;它可能是无知,或者不愿意承认

a行动的重要性,或者它可能是由于
$ b $而产生的明智决定b分析条件和评估所引入的不可靠性是一种可接受的权衡,以获得其他一些优势。 (

当然,你不能对

的相对优点进行明智的评估,直到你知道如何使用b / b
避免这样做,以及那将涉及到什么。)


Javascript设计可能是最容易被贬低的点

来自系统的潜在可靠性。这使得

javascript的设计可能比其具体实现更重要

(虽然这不是编码错误的借口)。那么浏览器脚本可以设计成是否可以在他们工作时添加到网页中,但是当它们失败时不会贬低它们吗?


在设计javascript时,重要的是要意识到它总会在某处失败。在任何百分比的浏览器上都不支持

javascript,而且还支持所有那些不支持所需功能的浏览器(或者在

一个影响其使用的环境(例如,旁边的弹出窗口

阻挡者))。脚本如何失败(最好是在自己的控制下)

变得与它工作时的重要性一样重要,为此,

标准是干净退化。 。干净的降级意味着用户没有显示错误报告,用户没有被打扰(关于他们的浏览器及其功能)和降级后的结果

网页完全可以用于提供给用户的
用户。


实现干净降级的最简单方法是启动100%

可靠的HTML并使用javascript从那里上升。这允许

降级状态成为底层HTML。然后设计该脚本

,以便通过其操作增强底层HTML(和

可能添加动态生成的控件等),但是

小心谨慎,检测浏览器对它的支持是什么?b
需要它并且只要浏览器没有优雅地撤销

似乎是支持的。所以,干净地降级回原来的

基础HTML。


作为一个设计原则,这一切都很好,但是可以实现吗? br />
如果没有javascript,javascript操作的UI仍然有意义吗?


有些东西无法实现干净降级,但不是

很多(他们可能是最好避免的javascript方面)。

绝大多数通常以

引入javascript依赖的方式实现的东西完全可以在没有它的情况下实现
依赖。


随着现代桌面浏览器能够大量操作

HTML,HTML中的任何节奏都可以通过脚本转换为

(并且做)几乎可以想象的事情,而最好的动态(和普通)浏览器可以操纵现有内容的事实意味着总是有b / b
一个干净退化的路径可用于任何(和所有功能较低的)功能较少的浏览器。


我最近一直在播放一个脚本,说明了极端的使用javascript操作底层HTML的
。它开始生活

作为对这个群体提出的问题的回应,但是我有相当多的

详细说明了它: -


< URL: http:// www。
页面上的第一个链接重新加载脚本禁用(或禁用javascript和

重新加载页面,或重新访问功能较少的浏览器)在它的降级状态下看到它的价值。它还不是很完美,但它确实证明了

可以通过javascript完成,而不会对

javascript产生任何依赖,一旦实现它就会停止重要有些

浏览器可能不支持javascript。


Richard。



If you went to the business people behind a web site (assuming it is a
commercial project) and tell them that an arbitrary and unnecessary
design decision was going to cost them 10% of their turnover, would you
expect that decision to be endorsed?

The starting point for a web site is HTML over HTTP (often in
combination with server-side scripting), which is 100% reliable and will
"work" on every web browser for all users (or at least as near to that
as can be achieved). Everything that detracts form that underlying 100%
reliability is the direct result of a design decision made by a human
(it is not inherent in the system).

How and why humans introduce unreliabilities varies a great deal; it
could be ignorance, or an unwillingness to recognise the significance of
a cause of action, or it could be an informed decision resulting from an
analysis of conditions and an assessment that the introduced
unreliability is an acceptable trade-off for some other advantage. (Of
course you cannot make an informed assessment of the relative merits of
introducing unreliability into an otherwise reliable system until you
understand how to avoid doing so, and what that would involve.)

Javascript design is probably the point where the most can be detracted
from the underlying reliability of the system. That makes the design of
javascript probably more important than its specific implementation
(though that is not an excuse for bad coding). So can browser scripts be
designed so that they add to a web page when they work, but do not
detract from it when they fail?

When designing javascript is important to realise that it will always
fail somewhere. On whatever percentage of browsers do not support
javascript at all for sure, and then additionally on all of those
browsers that do not support the required features (or are operated in
an environment that impacts of their use (such as, along side pop-up
blockers)). How a script fails (preferably under its own control)
becomes as important as what it will do when it works, and for this the
criteria is "clean degradation". Clean degradation means that the user
is not shown error reports, the user is not badgered (about their
browsers and its capabilities) and after the degradation the resulting
web page is completely useable in terms of what it presents to that
user.

The easiest way to achieve clean degradation is to start with 100%
reliable HTML and use javascript to go up from there. That allows the
degraded state to be that underlying HTML. The script is then designed
so that it enhances that underlying HTML through its manipulation (and
possibly adding dynamically generated controls and the like), but
cautiously, feature detecting the browser''s support for what it is
required of it and withdrawing gracefully whenever the browser does not
appear to be supportive. And so, cleanly degrading back to the original
underlying HTML.

That is all fine and good as a design principle, but can it be realised?
Can a javascript manipulated UI still make sense without javascript?

There are things that cannot be implemented to cleanly degrade, but not
that many (and they may be the aspects of javascript best avoided). The
vast majority of the things that are commonly implemented in a way that
introduces a javascript dependency are completely amenable to being
implemented without that dependency.

With the modern desktop browsers capable of considerable manipulation of
HTML anything paced within that HTML can be transformed by scripts to be
(and do) just about anything imaginable, while the fact that the most
dynamic (and common) browsers can be manipulating existing content means
that there is always a path of clean degradation available to any (and
all) less capable browsers.

I have recently been playing with a script that illustrates an extreme
of the manipulation of underlying HTML with javascript. It started life
as a response to a question asked on this group, but I have considerably
elaborated it in the mean while:-

<URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html >

- Visit it with a javascript capable/enabled modern desktop browser to
see how it manipulates its contents. And then use the first link on the
page to re-load with the script disabled (or disable javascript and
re-load the page, or re-visit with a less capable browser) to see it in
its degraded state. It isn''t yet perfect but it does demonstrate that
much can be done with javascript without introducing any dependence upon
javascript, and once that is achieved it stops being important that some
browsers may not support javascript.

Richard.


这篇关于JS启用了多少个浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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