渲染时间总是不时地不同
我想知道为什么加载某个页面的渲染时间有时会有所不同(我使用了某种浏览器)。我在该页面中有一个java脚本代码..所以当页面加载时,将会出现一个java脚本警报。
我打算将一个浏览器中的页面渲染时间与另一个浏览器中的渲染时间进行比较。但是,当仅在一个浏览器中时,渲染时间可能会有所不同。我如何与另一个浏览器进行比较?只是很难比较这些浏览器的渲染时间。
知道为什么会发生这种情况吗?
非常感谢:)
I wonder why the rendering time to load a certain page is different from time to time (i used one certain browser). I have a java script code in that page..so when the page load, there will be a java script alert coming up.
I'm intending to compare the rendering time of a page in one browser to another. But, when only in one browser the rendering time could be different form time to time..how might i campare to another browser?? It's just hard to compare the rendering time of those browser.
Any idea why this could happen?
Thanks a bunch :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否在实验室条件下进行测试,即。您确定渲染页面时不会对您的系统资源造成其他负担吗?
最重要的是,您的浏览器、扩展程序、其他选项卡等中是否正在运行任何其他进程。
从何处加载页面也非常重要,如果它不是本地服务器,那么您需要考虑很多变量。
另外,正如 nnnnnn 指出的那样,是加载时间还是渲染时间?
Are you testing under lab conditions, ie. are you sure that there are no other burdens on your system resources when rendering the page.
Most importantly, are there any other processes running in your browser, extensions, other tabs etc. etc.
It's also very important where you're loading the page from, if it's not a local server then you have a lot of variables to consider.
Also, as nnnnnn points out, is it load time, or rendering time?
简而言之,以下因素会严重影响渲染时间:
首先,我会检查缓存规则。根据这些情况,您的浏览器可能会被告知仅在短时间内保存静态元素,从而导致在被告知重新加载这些元素时加载时间更长。
其次,比较一天中不同时间的服务器速度(有可用的在线工具)。
还要看看您的服务器有多“繁忙”。特别是共享服务器有时可能会非常慢。
然后,看看你的代码。如果您设置 cookie,它们可能会影响加载时间,具体取决于它们的大小。 cookie 越大,网站加载速度可能会越慢。
In short, the following factors can heavily influence render time:
First, I'd check the caching rules. Depending on those, your browser might be told to only save static elements for a short amount of time, resulting in longer loading times when it is told to reload those.
Secondly, compare server speeds at different times of day (there's online tools for this).
Also have a look on how 'busy' your server is. Especially shared servers can be quite slow from time to time.
Then, have a look at your code. If you're setting cookies, these might influence loading time depending on their size. The larger the cookies grow, the slower the site loading might become.