Web 标准 - 页面大小
我想知道是否有关于网页文件大小的网络标准,考虑到用户的平均互联网连接,页面上的总资产应该是多少。
谢谢
I would like to know if there are any web standards regarding web page file-size , how much should the total assets on the page weight considering the users have an average internet connection.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
完全取决于您的用户平台。
移动
这些是估计值,很难找到好的比较图表。
据我所知
未来,但尚未推出
重要的是要认识到移动用户对慢速加载有更高的容忍度。因此,移动页面的 3 秒等待不应让很多人望而却步。
宽带
根据访问者的位置,速度可能有所不同。
http://www.speedtest.net/global.php#0
非洲平均为 1.93mbps,南美洲3mbps,而世界其他地区则> 6mbps。这些(据我所知是平均值)。
因此,如果您的访问者群偏向于非洲或南美洲,您应该尝试采用更轻量级的页面设计。对于世界其他地区来说,这不再是一个问题。
随着全球宽带速度的提高,页面大小将变得不再重要。但那一天还没有到来!
速度的重要性
我对在线响应能力进行了一些研究,目前找不到资源来支持这一点,但据我所知,Google 做了一些研究,发现用户对页面很敏感延迟仅为 30 毫秒,这意味着他们会倾向于两个内容相同的页面,其中一个页面的加载速度要快 30 毫秒。因此,速度可以帮助您在竞争中占据先机!人脑对速度的敏感度比我们想象的要高得多。但请记住,不同的平台用户有不同的容忍度。
推荐
越快越好!一个设计良好、CSS 驱动的布局自然会很小,并且有很多其他好处 (SEO)。如果您的页面加载缓慢,请找到瓶颈(服务器或文件大小)并致力于减少瓶颈,以便页面加载在受众目标平台上自然且快速。
Depends entirely on your users platform.
Mobile
These are estimates, surprisingly difficult to find good comparison charts.
as far as I can tell
future, but not out yet
It is important though to realise that mobile users have a higher tolerance for slow loads. So a 3 second wait for a mobile page shouldn't put many people off.
Broadband
Depending on your visitors location, can have varying speeds.
http://www.speedtest.net/global.php#0
Africa has average of 1.93mbps, South America 3mbps and the rest of the world is > 6mbps. These (as far as I can tell are averages).
So if your visitor base is biased towards the Africas or South America, you should try to aim for a lighter page design. The rest of the world it becomes less of an issue.
As broadband speeds improve world wide, page sizes will become largely irrelevant. But that day is not here yet!
The Importance of Speed
I studied a bit on online responsiveness, and can't find resources at the moment to back this up, but Google as far as I know did some research and found users were sensitive to page delays of just 30ms, meaning they would have a favourable bias towards two equal content pages where one loaded >=30ms faster. So speed can help get a leg up on competition! And the human brain is a lot more sensitive to speed than we might assume. Remember though, different platform users have different tolerance levels.
Recommendation
The faster the better! A well designed, CSS driven layout will naturally be small and have a lot of other benefits down the line (SEO). If your page is loading slowly, find the bottleneck (server or filesizes) and aim to reduce so that the page load is natural and speedy on your audiences target platforms.
由于全球范围内甚至用户之间的连接速度差异很大,因此没有真正的标准。
有关减小大小的一般提示,请参阅 Google 的 Pagespeed 规则:最小化负载大小< /a>
There are no real standards, seeing as connection speeds vary massively across the planet and even from user to user.
For general pointers on keeping sizes down, see Google's Pagespeed rules: Minimize payload size
也不要忘记延迟。如果页面上必须有大量数据,最好将其放在 1 或 2 个大项目中(即 1 个 css sprite 图像而不是 20 个小项目)。对于每个项目,您将至少产生 1 个往返延迟延迟。
即使您的页面“小”,无论您使用什么标准,如果页面上有大量项目,对于远程用户来说加载速度都会很慢。这是 CDN 的主要好处之一 - 让内容更接近用户,从而降低延迟。
Don't forget about latency too. If you have to have a lot of data on a page, it's much better to have it be in 1 or 2 large items (i.e. 1 css sprite image instead of 20 small items). For every item, you are going to incur at least 1 round trip latency delay.
Even if you page is "small", by whatever standard you use, if it has a large number of items on it, it's going to load slowly for remote users. This is one of the main benefits of CDNs - moving content closer to users so latency is lower.
没有标准将网页的大小限制为固定大小,因此我无法引用“网页不得大于 100kb”的消息来源,因为不存在这样的消息来源。
页面的大小完全与访问网页的受众相关。如果您有“平均”受众,您可以放心地发送 200kb(包括所有图像、包含内容和 HTML)。如果您的目标是移动设备,您将希望页面比这小得多。如果您要发布数据供在线服务使用,则发送兆字节页面可能是可以接受的。
因此,作为一名网页设计师,您需要运用自己的判断来决定页面的大小,并在与受众类似的条件下测试速度。
除了页面大小之外,您还可以采取多种措施来加快请求速度,包括 HTTP 压缩和最大程度地减少请求数量(即将脚本合并为单个包含文件、将脚本包含文件放置在页面底部等)。 ..
这是一个有用的工具,您可以与 Firefox 内部的 Firebug 一起使用来查看每个请求的详细信息...
https ://developer.yahoo.com/yslow/
There is no standard that limits the size of a web page to a fixed size, so I can't quote you a source that says "a web page must be no greater than 100kb" as no such source exists.
The size of the page is entirely related to the audience visiting the web page. If you have an "average" audience, you could confidently send 200kb (inclusive of all images, includes and HTML). If you are targeting mobile devices, you will want to make you pages much smaller than this. If you are publishing data for consumption by online services, it may be acceptable to send mega-byte pages.
So this is where as a web-designer you need to use your judgement to decide how big to make the page and to test the speeds in conditions similar to those of your audience.
Asides from page size, there are various things you can do to make your request faster, including HTTP compression and minimising the number of requests (i.e. combine your scripts into a single include, placing script includes at the bottom of your page and so on...
Here is a helpful tool you can use with Firebug inside of Firefox to view the details of each request...
https://developer.yahoo.com/yslow/