TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

An implausibly illustrated introduction to HTML5 Web Workers

108 点作者 tswicegood将近 15 年前

10 条评论

madair将近 15 年前
I don't really care for threaded Javascript in the browser, but damn can that dude illustrate a point! Cool!<p>[Edit] Ooooh, it's Mark Pilgrim, of course! Great stuff!
评论 #1607044 未加载
moron4hire将近 15 年前
I really don't count Chrome Frame as "works in IE." When you say, "works in IE", it has to mean, "works in the standard install of IE." Because that is the case that most people care about. We deal with IE primarily because we can't convince corporate clients to install <i>anything</i>. If I could get them to install Google Chrome Frame, I'd get them to install Google Chrome, period.
评论 #1607758 未加载
评论 #1607977 未加载
评论 #1607739 未加载
DougWebb将近 15 年前
This sounds great, but if all you're going is sending an AJAX request in the worker and stuffing the response into some element, I don't see much benefit. Most of the time you use an event handler to deal with the response so you're not blocking the main thread anyway. However, if there is any computation, DOM walking, or markup generation, I would definitely use a worker for that.<p>Unfortunately, this doesn't help the 60% of my users who really need it: the IE users with slow JS engines. I've measured 1-2 order of magnitude differences in performance between IE and Firefox/Chrome/Safari in my codebase, and there's just not much I can do for the IE users without withdrawing functionality I'm required to give them. (I wish Chrome Frame was an option, but I suspect that if they had the ability to use that, they'd have the ability to change browsers too, and they don't.)
mike-cardwell将近 15 年前
What are some use cases for worker threads? Initially I thought there must be loads, but when I considered that XHR is asynchronous anyway, and that Worker threads don't have access to the DOM...<p>I guess it would be good if you wanted to use your visitors CPU in the background for password cracking or for the various distributed network stuff like SETI.<p>But what practical benefits do web workers provide for normal web development?
alexbosworth将近 15 年前
Web Workers don't work on iOS do they? At least my iPad doesn't seem to support it - ran into this issue using Web Workers on my project
评论 #1608349 未加载
Groxx将近 15 年前
Suddenly, the Safari Extension model makes a <i>lot</i> more sense.
cubicle67将近 15 年前
what's not clear from this is scope. Does each worker have its own namespace?
评论 #1607230 未加载
gcb将近 15 年前
"Sanity of threads + robustness of web development.<p>What could possibly go wrong?"<p>Genius!
评论 #1607031 未加载
评论 #1607010 未加载
hasenj将近 15 年前
I don't really understand how's this different from events.<p>&#62; and your web app still assumes that my browser can only do one thing at a time<p>Um, no it doesn't. What makes you say that?
评论 #1607162 未加载
The_Igor将近 15 年前
Here is a short write up I did for my company blog after attending the now famous HTML5:The Future Of The Web mini conference.<p><a href="http://blog.mediaplex.com/2010/06/02/html5-why-you-should%C2%A0care/" rel="nofollow">http://blog.mediaplex.com/2010/06/02/html5-why-you-should%C2...</a>
评论 #1610579 未加载