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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

How Wikipedia uses HTML5 to save bandwidth

17 点作者 Nemmie超过 13 年前

2 条评论

gchucky超过 13 年前
Wikipedia may be saving bandwidth, but that's not the real reason they're switching to SVG for logos. They're doing it because SVGs can be more accurate versus a PNG or JPG version, and because it scales much better.<p>Take a look at the template {{Should be SVG}} (<a href="http://en.wikipedia.org/wiki/Template:Should_be_SVG" rel="nofollow">http://en.wikipedia.org/wiki/Template:Should_be_SVG</a>): it says "This image was uploaded in a raster graphics format such as PNG, GIF, or JPEG. However, it contains information that could be stored more efficiently and/or accurately in the SVG format, as a vector graphic."<p>Also, whenever you go to an article that displays an SVG image, it's actually a PNG rendering. It's only when you view the actual file that you see the SVG. Take a look at the United States article, for example. The image of the flag at the top is actually //upload.wikimedia.org/wikipedia/commons/thumb/e/e2/Flag_of_the_United_States_%28Pantone%29.svg/125px-Flag_of_the_United_States_%28Pantone%29.svg.png, not the SVG itself.
p858snake超过 13 年前
This has nothing to do with HTML5 and everything to do with SVG specs. Just because SVG is in the HTML5 specs doesn't mean that is what it is (Based on the comments on the blogs).<p>This may interest you, The HTML5 formatting[1] (Doctype and other magic) isn't enabled on en.wikipedia only MediaWiki wiki and the two test platforms:<p><pre><code> 'wgHtml5' =&#62; array( 'default' =&#62; false, 'mediawikiwiki' =&#62; true, 'testwiki' =&#62; true, 'test2wiki' =&#62; true, ), </code></pre> [1]. <a href="http://www.mediawiki.org/wiki/Manual:$wgHtml5" rel="nofollow">http://www.mediawiki.org/wiki/Manual:$wgHtml5</a>