有没有办法确定哪些计算机滞后并且不使用 javascript?
在我的网站中,我开发了很多 CSS3 过渡。我发现在旧计算机中,转换是滞后的。滞后降低了网站的用户体验。有没有办法确定哪些计算机滞后并且不使用 javascript?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
在我的网站中,我开发了很多 CSS3 过渡。我发现在旧计算机中,转换是滞后的。滞后降低了网站的用户体验。有没有办法确定哪些计算机滞后并且不使用 javascript?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
是的,这两种方法都需要某种方式在服务器端记录您的访问者及其功能。 “分析”工具可能会告诉您谁有 javascript,谁没有(或者您可以使用
)。
衡量响应能力是一个更加主观的问题。如果您能够胜任这项任务,那么“正确”的方法是用 JavaScript 编写客户端响应分析器,该分析器会发回统计信息。例如,可能使用 100 毫秒的 setInterval 来检查当前时间自上次调用以来是否超过 100 毫秒(表明 UI 滞后)。
就我个人而言,如果是个人网站我不会担心。
真正的问题是,您会如何处理这些信息?支持网站的两个不同版本可能会很麻烦,但这样的信息实际上会让您禁用“性感”效果,并且是一个非常有趣的想法。我自己可能会用它;祝你好运!
Yes, both of these methods require some way to log your visitors and their capabilities on the server-side. An 'analytics' tools will probably tell you who has javascript and who does not (or you can manually check using tricks like a
<noscript><blah src="log-that-my-ip-doesnt-have-javascript"/></noscript>
).Measuring responsiveness is a much more subjective matter. If you were up to the task, the "correct" way to do it would be to write a client-side responsiveness profiler in javascript, which sent back statistics. For example, perhaps a setInterval of 100ms that checks to see if the current time is more than 100ms since the last call (indicating UI lag).
Personally, I would not worry about it if it's a personal website.
The real question is, what would you do with such information? It might be unwieldy perhaps to support two different versions of the site, but such information would in fact you to disable "sexy" effects, and is a very interesting idea. I might use it myself; good luck!
也许我误解了你的问题,但是 CSS3 转换与 JavaScript 有什么关系呢?如果您想使用 JavaScript 检测浏览器是否支持 CSS3,请查看此处的资源:
只有最现代的浏览器对 CSS3 有很好的支持,所以对于那些在旧系统上使用功能强大的浏览器的人来说,我不确定你会对此做什么。除了检测操作系统之外,您实际上无法(轻松地)做任何事情来确定浏览器通过渲染过渡会消耗多少系统资源。
我个人的偏好是不要有太多过渡。当然,它们是“花哨的”和“养眼的”,但我不想使用一个让我等待观看这些花哨的事情发生的网站。我认为它会降低整体的网络浏览体验,并且您可能会因此而失去访问者。这并不是说它们在某些情况下没有用,只是不要过度使用。
Maybe I'm misunderstanding what you're asking, but what do CSS3 transitions have to do with JavaScript? If you want to detect whether a browser supports CSS3 using JavaScript, have a look at the resource over here:
Only the most modern browsers have good support for CSS3, so to those using powerful browsers on an old system, I'm not sure what you're going to do about that. Other than detecting operating system, there's really nothing you can do (easily) to determine how much taxing of system resources a browser is going to do by rendering transitions.
My personal preference would be to not have many transitions. Sure, they're "fancy" and "eye candy-ish," but I don't want to use a website that's making me wait to watch those fancy things happening. I think it detracts from the overall web browsing experience and you might lose visitors because of it. That's not to say that they can't be useful in some cases, just don't overdo it.
在 Web 开发中使用技术之前,您需要认真考虑浏览器支持。取决于您是否愿意让您的网站对很多人来说崩溃。考虑此处列出的 CSS 转换支持: http://www .deepbluesky.com/blog/-/browser-support-for-css3-and-html5_72/
You need to seriously consider browser support before using technology in web development. Depends on whether you're okay or not with having your site break down for many people. Consider CSS transitions support listed here: http://www.deepbluesky.com/blog/-/browser-support-for-css3-and-html5_72/