老是抱怨责怪他人

tech2023-05-08  91

老是抱怨责怪他人

I was hoping it was a blip. I was hoping 2015 would be the year of performance. I was wrong. Average web page weight has soared 7.5% in five months to exceed 2Mb. That’s three 3.5 inch double-density floppy disks-worth of data (ask your grandparents!).

我希望那是个短暂的瞬间。 我希望2015年会是业绩的一年 。 我错了。 平均网页重量在五个月内飙升了7.5%,超过2Mb。 那是三个3.5英寸双密度软盘值得的数据(问您的祖父母!) 。

According to the May 15, 2015 HTTP Archive Report, the statistics gathered from almost half a million web pages are:

根据2015年5月15日HTTP存档报告 ,从近一百万个网页收集的统计数据为:

technologyend 2014May 2015increaseHTML59Kb56Kb-5%CSS57Kb63Kb+11%JavaScript295Kb329Kb+12%Images1,243Kb1,310Kb+5%Flash76Kb90Kb+18%Other223Kb251Kb+13%Total1,953Kb2,099Kb+7.5% 技术 2014年底 2015年5月 增加 HTML 59Kb 56Kb -5% CSS 57Kb 63Kb + 11% JavaScript 295Kb 329Kb + 12% 图片 1,243Kb 1,310Kb + 5% 闪 76Kb 90Kb + 18% 其他 223Kb 251Kb + 13% 总 1,953Kb 2,099Kb + 7.5%

The biggest rises are for CSS, JavaScript, other files (mostly fonts) and—surprisingly—Flash. The average number of requests per page:

增长最大的是CSS,JavaScript,其他文件(主要是字体)以及令人惊讶的 Flash。 每页平均请求数:

100 files in total (up from 95)

总共100个文件(之前95个文件) 7 style sheet files (up from 6)

7个样式表文件(原为6个) 20 JavaScript files (up from 18)

20个JavaScript文件(从18个开始) 3 font files (up from 2)

3个字体文件(原为2个)

Images remain the biggest issue, accounting for 56 requests and 62% of the total page weight.

图片仍然是最大的问题,占56个请求,占页面总重量的62%。

Finally, remember these figures are averages. Many sites will have a considerably larger weight.

最后,请记住这些数字是平均值。 许多站点将具有更大的权重。

我们正在杀死网络! (We’re Killing the Web!)

A little melodramatic, but does anyone consider 2Mb acceptable? These are public-facing sites—not action games or heavy-duty apps. Some may use a client-side framework which makes a ‘single’ page look larger, but those sites should be in the minority.

有点戏剧性,但是有人认为2Mb可以接受吗? 这些是面向公众的网站,而不是动作游戏或重型应用程序。 有些人可能会使用客户端框架 ,从而使“单个”页面看起来更大,但这些网站应该占少数。

The situation is worse for the third of users on mobile devices. Ironically, a 2Mb responsive site can never be considered responsive on a slower device with a limited—and possibly expensive—mobile connection.

对于三分之一的移动设备用户而言,情况更糟。 具有讽刺意味的是,永远无法将2Mb响应站点视为在移动设备有限且可能昂贵的较慢设备上响应的情况。

I’ve blamed developers in the past, and there are few technical excuses for not reducing page weight. Today, I’m turning my attention to clients: they’re making the web too complex.

过去我曾责怪开发人员 ,并且很少有技术借口来减少页面重量。 今天,我将注意力转向客户: 他们使网络变得过于复杂 。

Many clients are wannabe software designers and view developers as the implementers of their vision. They have a ground-breaking idea which will make millions—once all 1,001 of their “essential” features have been coded. It doesn’t matter how big the project is, the client always want more. They:

许多客户希望成为软件设计师,并将开发人员视为其愿景的实施者。 一旦有了“基本”功能的全部1,001个编码,它们便具有开创性的想法,它将成百万。 不管项目有多大,客户总是想要更多。 他们:

mistakenly think more functionality attracts more customers

误以为更多功能吸引了更多客户 think they’re getting better value for money from their developer, and

认为他们从开发商那里获得了更高的性价比,并且 don’t know any better.

没有更好的了解。

Feature-based strategies such as “release early, release often” are misunderstood or rejected outright.

基于功能的策略,例如“过早发布,经常发布”,被误解或被彻底拒绝。

The result? 2Mb pages filled with irrelevant cruft, numerous adverts, obtrusive social media widgets, shoddy native interface implementations and pop-ups which are impossible to close on smaller screens.

结果? 2Mb的页面充满了无关紧要的内容,大量的广告,引人入胜的社交媒体小部件,劣质的本机界面实现以及无法在较小的屏幕上关闭的弹出窗口。

But we give in to client demands.

但是我们屈服于客户需求。

Even if you don’t, the majority of developers do—and it hurts everyone.

即使您不这样做,大多数开发人员也会这样做,这会伤害所有人。

We continue to prioritize features over performance. Adding stuff is easy and it makes clients happy. But users hate the web experience; they long for native mobile apps and Facebook Instant Articles. What’s more, developers know it’s wrong: Web vs Native: Let’s Concede Defeat.

我们继续将功能置于性能之上。 添加内容很容易,并且使客户满意。 但是用户讨厌网络体验。 他们渴望本地移动应用程序和Facebook Instant Articles 。 而且,开发人员知道这是错误的: Web与本机:让我们让步吧 。

苹果与微软的主张 (The Apple vs Microsoft Proposition)

It’s difficult to argue against a client who’s offering to pay for another set of frivolous features. Clients focus more on their own needs rather than those of their users. More adverts on the page will raise more revenue. Showing intrusive pop-ups leads to more sign-ups. Presenting twenty products is better than ten. These tricks work to a certain point, but users abandon the site once you step over the line of acceptability. What do clients instinctively do when revenues fall? They add more stuff.

很难与愿意提供另一套琐碎功能的客户抗衡。 客户更多地关注自己的需求,而不是用户的需求。 页面上的更多广告将增加收入。 显示侵入式弹出窗口会导致更多的注册。 展示二十种产品胜过十种。 这些技巧在一定程度上起作用,但是一旦您超过可接受范围,用户就会放弃该站点。 当收入下降时,客户本能地做什么? 他们添加更多的东西。

Creating a slicker user experience with improved performance is always lower down the priority list. Perhaps you can bring it to the fore by discussing the following two UX approach examples …

始终在优先级列表的下方创建具有改进性能的流畅的用户体验。 也许您可以通过讨论以下两个UX方法示例来使它脱颖而出……

Historically, Microsoft designs software by committee. Numerous people offer numerous opinions about numerous features. The positives: Microsoft software offers every conceivable feature and is extremely configurable. The negatives: people use a fraction of that power and it can become overly complex—for example, the seventeen shut-down options in Vista, or the incomprehensible Internet options dialog.

历史上,Microsoft由委员会设计软件。 许多人对众多功能提出了很多意见。 优点:Microsoft软件提供了所有可以想到的功能,并且可以进行高度配置。 缺点:人们只使用其中的一小部分,它可能变得过于复杂-例如,Vista中的17个关闭选项,或难以理解的Internet选项对话框。

Apple’s approach is more of a dictatorship with relatively few decision makers. Interfaces are streamlined and minimalist, with only those features deemed absolutely necessary. The positives: Apple software can be simple and elegant. The negatives: best of luck persuading Apple to add a particular feature you want.

苹果的方法更多是独裁统治,决策者相对较少。 界面经过简化和简约,只有那些绝对必要的功能。 优点:Apple软件可以简单而精致。 不利因素:幸运的是,说服苹果公司添加了您想要的特定功能。

Neither approach is necessarily wrong, but which company has been more successful in recent years? The majority of users want an easy experience: apps should work for them—not the other way around. Simplicity wins.

两种方法都不一定是错误的,但是近年来哪家公司取得了更大的成功? 大多数用户都希望获得轻松的体验:应用程序应该为他们工作,而不是相反。 简约胜出。

Ask your client which company they would prefer to be. Then suggest their project could be improved by concentrating on the important user needs, cutting rarely-used features and prioritizing performance.

询问您的客户他们希望成为哪家公司。 然后建议可以通过专注于重要的用户需求,削减很少使用的功能并优先考虑性能来改善他们的项目。

2015年可能是业绩之年 (2015 Can be the Year of Performance)

The web is amazing. Applications are cross-platform, work anywhere in the world, require no installation, automatically back-up data and permit instant collaboration. Yet the payload for these pages has become larger and more cumbersome than native application installers they were meant to replace. 2Mb web pages veer beyond the line of acceptability.

网络真是太神奇了。 应用程序是跨平台的,可以在世界任何地方工作,无需安装,可以自动备份数据并允许即时协作。 但是,这些页面的有效负载已经比它们要替换的本机应用程序安装程序更大且更麻烦。 2Mb网页已超出可接受范围。

If we don’t do something, the obesity crisis will continue unabated. Striving for simplicity isn’t easy: reducing weight is always harder than putting it on. Endure a little pain now and you’ll have a healthier future:

如果我们不采取任何行动,肥胖危机将持续下去。 追求简单并非易事:减轻重量总是比穿上衣服困难。 现在忍受一点痛苦,您将拥有一个更健康的未来:

use tools to encourage caching, reduce HTTP requests, minify payloads and remove unnecessary components—see The Complete Guide to Reducing Page Weight

使用工具鼓励缓存,减少HTTP请求,减少有效载荷并删除不必要的组件-请参阅《减少页面重量的完整指南》

consider Chris Ruppel’s idea of Throttled Thursdays to limit your bandwidth and experience your site/app like your users.

考虑克里斯·鲁珀尔(Chris Ruppel)的“ 节流星期四”的想法,以限制您的带宽并像您的用户一样体验您的网站/应用。

It’s time to prioritize performance.

现在是确定性能优先级的时候了。

翻译自: https://www.sitepoint.com/2mb-web-pages-whos-blame/

老是抱怨责怪他人

相关资源:jdk-8u281-windows-x64.exe
最新回复(0)