Netscape 7.02 - 脚本问题。 [英] Netscape 7.02 - script problem.

查看:77
本文介绍了Netscape 7.02 - 脚本问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Netscape 7.02让我头疼的是下载了雪花脚本。

从空白页开始,我插入脚本并在IE中检查

6和Netscape 7.02。一切正常,看起来很好。检查CPU

的使用情况(Windows任务管理器>性能)对于运行XP的奔腾4 3.06GHz上的两种浏览器,读数为0%至2%。


我添加了文字,图片,平铺背景等等。我注意到

鼠标在Netscape 7中变得不稳定。现在另一个CPU使用检查

为N7提供了98%的峰值读数,但在IE中仍为2%? />

我删除了平铺的背景jpg,使其降低到33%。然后

删除了文本和图像,现在再次出现空白页面,除了

脚本,它将其返回到0%到2%!


这个脚本有问题还是归结为Netscape 7?我已经在可信赖的旧Netscape 4之前使用了大量的动画脚本和

从来没有出现过这样的问题 - 我没多久就升级到了7. br />

无论如何,我正在使用的剧本来自
http://www.btinternet.com/~kurt.grig...t/SnowImg.html

是不是如果是这样我在哪里可以找到另一个?这个页面是给我的b $ b $ 9岁的女儿,她真的想要一个雪主题和Daddies看起来好像现在这个位置有点暗淡。

感谢您的帮助,

Jonny。

Netscape 7.02 is giving me a headache with a downloaded snow script.
Starting with a blank page, I inserted the script and checked it in IE
6 and Netscape 7.02. Everything worked and looked fine. A check on CPU
usage (Windows Task Manager>Performance) gave a 0% to 2% reading for
both browsers on a Pentium 4, 3.06GHz running XP.

As I added text, images, tiled background and so on. I noticed the
mouse was becoming jerky in Netscape 7. Another CPU usage check now
gave a 98% peak reading for N7 but still 2% in IE??

I removed the tiled background jpg, which brought it down to 33%. Then
removed the text and images, now a blank page again except for the
script, which returned it to 0% to 2%!

Is there a problem with this script or is it down to Netscape 7? I''ve
used loads of animation scripts before in trusty old Netscape 4 and
never had any problems like this - I''ve not long upgraded to 7.

Anyway, the script I''m using is from
http://www.btinternet.com/~kurt.grig...t/SnowImg.html
Is it duff and if so where can I find another? The page is for my
9-year-old daughter, she really wants a snow theme and Daddies looking
a bit dim at the moment.

Thanks for any help,
Jonny.

推荐答案

虽然这是一个编程相当糟糕的脚本, Netscape应该受到责备。


我只在MSIE 6和Mozilla Firebird 0.7中看过它,并且体验了类似的问题,似乎MSIE有一个绘制

网页的方式更为简洁,这意味着当一些东西被一遍又一遍地绘制时

会使计算机的速度降低更多。

这是我能提出的最简单的解决方案:

更改此行:

runspeed = 40; // setTimeout speed!


这样的东西:

runspeed = navigator.appName ==" Microsoft Internet Explorer"?40:500;

// setTimeout速度!


这不是一个很好的解决方案,因为它会使非MSIE

浏览器上的雪跳跃,但它将节省您的CPU并停止鼠标跳跃


Jonny <乔********** @ yahoo.co.uk>在留言中写道

news:f4 ************************** @ posting.google.c om ...
although this is a rather poorly programmed script, Netscape is to blame.

I have only looked at it in MSIE 6 and Mozilla Firebird 0.7, and experianced
similar issues, it seems that MSIE has a much cleaner way of drawing the
webpages, which means that when something is being drawn over and over it
slows the computer down much more.

Here is the easiest solution I can come up with:
change this line:
runspeed=40; //setTimeout speed!

to something like this:
runspeed=navigator.appName == "Microsoft Internet Explorer"?40:500;
//setTimeout speed!

This is not a great solution as it makes the snow jumpy on non MSIE
browsers, but it will save your CPU and stop the mouse jumping

"Jonny" <jo**********@yahoo.co.uk> wrote in message
news:f4**************************@posting.google.c om...
Netscape 7.02令我头疼的是下载了雪花脚本。
从一个空白页开始,我插入了脚本并在IE
6和Netscape 7.02中进行了检查。一切正常,看起来很好。检查CPU使用率(Windows任务管理器>性能)对于运行XP的奔腾4 3.06GHz上的两种浏览器的读数为0%至2%。

我添加了文字,图像,平铺背景等。我注意到在Netscape 7中鼠标变得不稳定。现在另一个CPU使用检查
为N7提供了98%的峰值读数但在IE中仍为2%?

我删除了平铺的背景jpg,降低到33%。然后
删除了文本和图像,现在再次出现一个空白页面,除了
脚本,它返回0%到2%!

这个脚本有问题吗还是归功于Netscape 7?我之前在可信赖的旧Netscape 4中使用了很多动画脚本,而且从来没有像这样的任何问题 - 我没多久就升级到了7.

无论如何,我正在使用的剧本来自
http://www.btinternet.com/~kurt.grig...t/SnowImg.html
它是duff,如果是,我在哪里可以找到另一个?这页面是我9岁的女儿,她真的想要一个雪主题和Daddies看起来有点昏暗。

感谢您的帮助,< Jonny。
Netscape 7.02 is giving me a headache with a downloaded snow script.
Starting with a blank page, I inserted the script and checked it in IE
6 and Netscape 7.02. Everything worked and looked fine. A check on CPU
usage (Windows Task Manager>Performance) gave a 0% to 2% reading for
both browsers on a Pentium 4, 3.06GHz running XP.

As I added text, images, tiled background and so on. I noticed the
mouse was becoming jerky in Netscape 7. Another CPU usage check now
gave a 98% peak reading for N7 but still 2% in IE??

I removed the tiled background jpg, which brought it down to 33%. Then
removed the text and images, now a blank page again except for the
script, which returned it to 0% to 2%!

Is there a problem with this script or is it down to Netscape 7? I''ve
used loads of animation scripts before in trusty old Netscape 4 and
never had any problems like this - I''ve not long upgraded to 7.

Anyway, the script I''m using is from
http://www.btinternet.com/~kurt.grig...t/SnowImg.html
Is it duff and if so where can I find another? The page is for my
9-year-old daughter, she really wants a snow theme and Daddies looking
a bit dim at the moment.

Thanks for any help,
Jonny.



" neerolyte" <是ne ******* @ netspace.nOsPaM.net.au>在消息新闻中写道:< bt ********** @ otis.netspace.net.au> ...
"neerolyte" <ne*******@netspace.nOsPaM.net.au> wrote in message news:<bt**********@otis.netspace.net.au>...
虽然这是一个编程相当糟糕的脚本,Netscape是责备。

我只在MSIE 6和Mozilla Firebird 0.7中看过它,并且经历了类似的问题,似乎MSIE有一个更清晰的方式来绘制
网页,这意味着当一些东西被一遍又一遍地拉下来时
会使计算机的速度降低更多。

这是我能想到的最简单的解决方案:
改变这一行:
runspeed = 40; // setTimeout speed!

这样的事情:
runspeed = navigator.appName ==" Microsoft Internet Explorer"?40:500;
// setTimeout speed!

这不是一个很好的解决方案,因为它会使非MSIE浏览器上的雪跳跃,但它会节省你的CPU并停止鼠标跳跃
although this is a rather poorly programmed script, Netscape is to blame.

I have only looked at it in MSIE 6 and Mozilla Firebird 0.7, and experianced
similar issues, it seems that MSIE has a much cleaner way of drawing the
webpages, which means that when something is being drawn over and over it
slows the computer down much more.

Here is the easiest solution I can come up with:
change this line:
runspeed=40; //setTimeout speed!

to something like this:
runspeed=navigator.appName == "Microsoft Internet Explorer"?40:500;
//setTimeout speed!

This is not a great solution as it makes the snow jumpy on non MSIE
browsers, but it will save your CPU and stop the mouse jumping



对于任何动画脚本,超时/间隔必须至少为50毫秒。

任何更低,它只是没有动画。随着IE的继续,Netscape 4轻松处理了这种

脚本。


是否新的Netscape'& Opera的'或者技术上是正确的'

在他们的重绘中是不重要的。他们疏远了许多喜欢这种剧本并帮助IE走向总计

统治的人们。


至于有问题的脚本,它有一个隐藏自己的选项

Netscape 7;我只是用它而忘了它。你可以试试
http://www.dynamicdrive.com



For any animated script, the timeout/interval has to be at least 50ms.
Any lower and it just is NOT animated. Netscape 4 handled this sort of
script with ease as IE continues to.

Whether the new Netscape''s & Opera''s are or nor "technically correct"
in their redrawing is beside the point. They are alienating lots of
people who like this sort of script and helping IE towards total
domination.

As for the script in question, It has an option to hide itself from
Netscape 7; I''d just use that and forget about it. You can try
http://www.dynamicdrive.com for something else.


neerolyte写道:
neerolyte wrote:
虽然这是一个编程相当糟糕的脚本,Netscape应该受到责备。


在某种程度上,这是事实。基于Mozilla的浏览器正在努力处理非常需要动画的DHMTL脚本。这就是这里的情况:


错误64516:dhtml雪效应的CPU使用率为95-99%
http://bugzilla.mozilla.org/show_bug.cgi?id=64516


错误186442:降雪脚本导致浏览器慢慢爬行
http:// bugzilla.mozilla.org/show_bug.cgi?id=186442

我只在MSIE 6和Mozilla Firebird 0.7中看过它,并且经历了类似的问题,似乎MSIE有一个更清晰的方式来绘制
网页,这意味着当一些东西被一遍又一遍地拉过来时
减慢了计算机的速度。


是的!

这是我能提出的最简单的解决方案:
改变这一行:
runspeed = 40; // setTimeout speed!

这样的事情:
runspeed = navigator.appName ==" Microsoft Internet Explorer"?40:500;


这不是检测浏览器的最佳方式。无论如何,我认为主要的问题是
问题是setTimeout值。对于这样的页面,我仍然不建议使用64美元甚至128毫秒的

。原来的海报有一个3Ghz

cpu:对于很多用户来说并非如此。

// setTimeout speed!


再次纠正!在

Cut-N-Paste javascript网站中有很多编码错误的脚本,这些网站无意识地拥有脚本诉诸于
疯狂的setTimeout值要求疯狂的cpu,视频和内存资源。


这不是一个很好的解决方案,因为它会使非MSIE浏览器上的雪跳跃,但它会节省你的CPU并阻止鼠标跳跃


这是一个比你想象的更好的解决方案。 setTimeout值(在递归调用和强烈的DHTML动画中特别是
)应该永远不会超过64毫秒。要求严格的脚本。甚至MSDN也这么说。


代码优化:

setTimeout

说到动画,最常见的技巧之一用于动画

元素是使用带有window.setTimeout的计时器来逐页地在页面上定位元素

。快速提示:使用尽可能少的计时器。

计时器消耗宝贵的系统资源,多个

计时器的行为,所有这些都在一起工作,在不同的电源上会有很大的不同

机器。一种动画多个元素的动画方法,同时最小化计时器

使用,是使用单个主循环,由单个

window.setTimeout()调用。在该单循环中,保留您需要操作的所有

元素的列表。每个刻度线循环遍历该列表,

并执行所需的移动。

Michael Wallent

Microsoft Corporation
http:/ /msdn.microsoft.com/library/de...l/dude1201.asp

DU


" Jonny" ; <乔********** @ yahoo.co.uk>在消息中写道
新闻:f4 ************************** @ posting.google.c om ...
although this is a rather poorly programmed script, Netscape is to blame.

In part, this is true. Mozilla-based browsers are struggling with very
demanding animation DHMTL scripts. This is exactly the case here:

Bug 64516: 95-99% CPU usage for dhtml "snow effect"
http://bugzilla.mozilla.org/show_bug.cgi?id=64516

Bug 186442: "snowfall" script causes browser to slow to a crawl
http://bugzilla.mozilla.org/show_bug.cgi?id=186442
I have only looked at it in MSIE 6 and Mozilla Firebird 0.7, and experianced
similar issues, it seems that MSIE has a much cleaner way of drawing the
webpages, which means that when something is being drawn over and over it
slows the computer down much more.

Yep!
Here is the easiest solution I can come up with:
change this line:
runspeed=40; //setTimeout speed!

to something like this:
runspeed=navigator.appName == "Microsoft Internet Explorer"?40:500;
This is not the best way to detect browsers. Anyway, I think the main
issue is the setTimeout value. I still don''t recommend anything under
64msec or even 128msec for such page. The original poster has a 3Ghz
cpu: that,s not the case for many users.
//setTimeout speed!

Correct again! There are a lot of badly coded scripts out there in
Cut-N-Paste javascript sites which mindlessly have scripts resorting to
insane setTimeout values demanding insane cpu, video and memory resources.


This is not a great solution as it makes the snow jumpy on non MSIE
browsers, but it will save your CPU and stop the mouse jumping

It is a better solution than you may think. setTimeout values (in
particular in recursive calls and intense DHTML animations) should never
be faster than 64 msec. for demanding scripts. Even MSDN says so too.

"Code optimization:
setTimeout
Speaking of animation, one of the most common techniques for animating
elements is to use a timer with window.setTimeout to position an element
on the page incrementally. A quick tip: Use as few timers as possible.
Timers consume valuable system resources, and the behavior of multiple
timers, all working together, will greatly vary on differently powered
machines. A way to animate multiple elements, while minimizing timer
use, is to employ a single main loop, powered with a single
window.setTimeout() call. In that single loop, keep a list of all
elements you need to manipulate. Loop through that list with each tick,
and perform your required move."
Michael Wallent
Microsoft Corporation
http://msdn.microsoft.com/library/de...l/dude1201.asp

DU

"Jonny" <jo**********@yahoo.co.uk> wrote in message
news:f4**************************@posting.google.c om...
Netscape 7.02令我头疼的是下载了雪花脚本。
从一个空白页开始,我插入了脚本并在IE
6和Netscape 7.02中进行了检查。一切正常,看起来很好。检查CPU使用率(Windows任务管理器>性能)对于运行XP的奔腾4 3.06GHz上的两种浏览器的读数为0%至2%。

我添加了文字,图像,平铺背景等。我注意到在Netscape 7中鼠标变得不稳定。现在另一个CPU使用检查
为N7提供了98%的峰值读数但在IE中仍为2%?

我删除了平铺的背景jpg,降低到33%。然后
删除了文本和图像,现在再次出现一个空白页面,除了
脚本,它返回0%到2%!

这个脚本有问题吗还是归功于Netscape 7?我之前在可信赖的旧Netscape 4中使用了很多动画脚本,而且从来没有像这样的任何问题 - 我没多久就升级到了7.

无论如何,我正在使用的剧本来自
http://www.btinternet.com/~kurt.grig...t/SnowImg.html
它是duff,如果是,我在哪里可以找到另一个?这页面是我9岁的女儿,她真的想要一个雪主题和Daddies看起来有点昏暗。

感谢您的帮助,< Jonny。
Netscape 7.02 is giving me a headache with a downloaded snow script.
Starting with a blank page, I inserted the script and checked it in IE
6 and Netscape 7.02. Everything worked and looked fine. A check on CPU
usage (Windows Task Manager>Performance) gave a 0% to 2% reading for
both browsers on a Pentium 4, 3.06GHz running XP.

As I added text, images, tiled background and so on. I noticed the
mouse was becoming jerky in Netscape 7. Another CPU usage check now
gave a 98% peak reading for N7 but still 2% in IE??

I removed the tiled background jpg, which brought it down to 33%. Then
removed the text and images, now a blank page again except for the
script, which returned it to 0% to 2%!

Is there a problem with this script or is it down to Netscape 7? I''ve
used loads of animation scripts before in trusty old Netscape 4 and
never had any problems like this - I''ve not long upgraded to 7.

Anyway, the script I''m using is from
http://www.btinternet.com/~kurt.grig...t/SnowImg.html
Is it duff and if so where can I find another? The page is for my
9-year-old daughter, she really wants a snow theme and Daddies looking
a bit dim at the moment.

Thanks for any help,
Jonny.




这篇关于Netscape 7.02 - 脚本问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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