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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Wikipedia's JavaScript Initialisation on a Budget

96 点作者 abbe98超过 5 年前

10 条评论

evmar超过 5 年前
I am surprised to discover that wikipedia appears to not use a standard minifier on their JS, but rather they have a custom one (written in PHP) that appears to just do whitespace-style removal, which they appear to run in part of the critical path of serving (?!) rather than as an offline build step.<p><a href="https:&#x2F;&#x2F;www.mediawiki.org&#x2F;wiki&#x2F;ResourceLoader&#x2F;Architecture#Resource:_Scripts" rel="nofollow">https:&#x2F;&#x2F;www.mediawiki.org&#x2F;wiki&#x2F;ResourceLoader&#x2F;Architecture#R...</a><p>You can &#x27;view source&#x27; on a page to confirm that their JS doesn&#x27;t even do &quot;safe&quot; transformations like local variable renaming.
评论 #21020351 未加载
评论 #21020694 未加载
评论 #21025634 未加载
评论 #21020418 未加载
评论 #21025516 未加载
pugio超过 5 年前
&gt; Wikipedia&#x27;s startup payload now neatly fits into the target budget of 28 KB – chosen as the lowest multiple of 14KB we can fit within subsequent bursts of Internet packets to a web browser.<p>But (according to their linked article) 14KB is only the max size of the _first_ burst of packets, after which TCP will usually double the size in each subsequent burst. So two bursts equal 14 + 28 = 42 KB, not 28.<p>Are they doing this to assume a connection limited to only its initial burst size? I imagine this might be relevant in low-data areas (developing countries, etc.), but they don&#x27;t go in to it.
andrethegiant超过 5 年前
The &quot;Startup manifest size&quot; graph is misleading. The Y-axis doesn&#x27;t start at zero, which makes the Sep 2019 size look like it is multiple times smaller than the Sep 2018 size. In reality, it&#x27;s only ~22% smaller.
评论 #21020795 未加载
scarmig超过 5 年前
This is the kind of Javascript work I love. All too often we see terrible, overly-engineered Javascript monstrosities that actively make the web worse for everyone, and that can make some of us anti-JS zealots. But JS can improve users&#x27; experiences as well, and the folks at Wikipedia are good at it.
bo1024超过 5 年前
Tangential, but wikipedia without javascript enabled is a great experience.
评论 #21024292 未加载
评论 #21020811 未加载
herpderperator超过 5 年前
What is &quot;the size of two 14 KB bursts of Internet packets&quot;? MTU is 1500 bytes before overheard. How did they get 14 KB? What significance does that have? And what is &quot;burst&quot;?
评论 #21020213 未加载
评论 #21020299 未加载
kick超过 5 年前
This is a great article. Wikipedia is the only site I have used in a long time that works better with Javascript turned off.
评论 #21020040 未加载
shanselman超过 5 年前
Dat Y-axis.
badrequest超过 5 年前
Kudos to the Wikipedia&#x2F;Wikimedia teams for all this hard work!
iforgotpassword超过 5 年前
Not to abuse this post&#x27;s comment section but I recently noticed that on IE11 mobile, image captions overlap with the article&#x27;s text. I don&#x27;t think this is relevant enough to formally file a bug report (browser seems to be grade c) but in case someone working on the site&#x27;s CSS reads this and feels overly bored, well..... ;-)
评论 #21019138 未加载