循环HTML5背景的最佳文件大小是多少? [英] What's the optimal file size for a looping HTML5 background?

查看:96
本文介绍了循环HTML5背景的最佳文件大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能找到的唯一相关问题是JWPlayer特有的.我的问题不是JWPlayer特有的:

The only related question I could find is specific to JWPlayer. My question isn't specific to JWPlayer:

> html5背景的最佳文件大小JWPlayer播放视频流?

搜索引擎的结果似乎也无法提供指导.

Search engine results don't seem to yield a guideline either.

在回答没有最佳选择并且世界过于美丽且变化多端以至于无法回答一个答案之前,请记住我将问题基于平均或最常见的互联网连接.

Before answering that there is no optimal and the world is far too beautiful and replete in variation for one to fathom an answer, bear in mind that I'm basing my question on the average or most common internet connections.

换句话说,如果我想覆盖大多数互联网用户,而又没有遇到重大的负载/性能问题,我的最大文件大小限制应该是什么?

To put it another way, if I wanted to reach the majority of internet users, without experiencing significant load/performance issues, what should my maximum file size limitation be?

推荐答案

根据 Akami 2014互联网速度等级,全球平均互联网速度为3.9Mbps(大约每秒500KB或半兆字节).但是,我强烈建议您不要以平均水平为目标,而是以低于平均水平为目标进行优化,以使更多的人在您的网站上获得愉快的体验.我建议以优化速度为1.5Mbps(每秒约185KB)为目标.这意味着,如果您希望页面在合理的10秒内以1.5Mb的慢速连接加载,并且未缓存(首次有人访问您的网站,它将在缓存图像时加快速度),则您的页面总数应小于2MB.因此,您必须问自己,您愿意在背景图像中使用多少2MB?我建议将背景图像的目标定位在150-300Kb左右.使用Photoshop之类的程序和发布到网络"功能来播放背景图像设置和文件类型,以将其大小更改为所需的大小.我建议您避免使用Jpeg,而将其用于PNG.

According to the Akami 2014 internet speed ratings, the world average internet speed is 3.9Mbps (That's about 500KB per second or half a megabyte). However, I would strongly suggest not aiming for average, but aiming below average for optimization so that even more people have a pleasant experience on your site. I would suggest aiming to optimize for speeds around 1.5Mbps (about 185KB per second). That means if you want your page to load in a reasonable 10 seconds on a slow 1.5Mb connection, uncached (the first time someone visits your site, it will speed up as images are cached) your total page should be less then 2MB. So you have to ask yourself how much of that 2MB are you willing to use on a background image? I would suggest aiming for around 150-300Kb for a background image. Use a program like Photoshop and the "Publish to Web" feature to play with your background images settings and file types to change it's size to what you want. I suggest avoiding Jpeg and aiming for PNG.

这篇关于循环HTML5背景的最佳文件大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆