server酱_酱

server酱

I like minimalist websites. I understand teaser pages with attitude, especially for stars like Eminem. But the source code of the current landing page drives me to dismay.

我喜欢简约的网站。 我了解态度的预告片,尤其是对于像Eminem这样的明星。 但是当前登录页面的源代码使我感到沮丧。

What do we have here?

我们有什么在这里?

  • Over 900 lines of code

    超过900行代码
  • 66 separate HTTP requests for resources that are entirely unused

    66个单独的HTTP请求,这些请求完全没有使用
  • A 200k image

    200k图像
  • Total 779KB download

    总计779KB下载

What should it be?

应该是什么

This:

这个:

html { height: 100%; }
body {
	background: url('eminemflippingeveryoneoff.jpg') black no-repeat center;
	margin: 0;
	background-size: cover;
}

That’s the entire page. That’s ultra-minimalism.

这就是整个页面。 那是极简主义。

The image can be optimized to 15KB. Add in a link to Google Analytics and you’re done. Total page size: 16KB.

图像可以优化到15KB。 添加指向Google Analytics(分析)的链接,即可完成。 页面总大小:16KB。

Why this monstrosity instead? Partly because the developers chose to make it with Drupal Gardens, a CMS that adds a ton of cruft to the code. Server-side caching will deliver the page as fast as it can, but there’s no need to use a CMS for a teaser site. Just throw up a static page and you’re done.

为什么是这种怪物? 部分原因是开发人员选择使用Drupal Gardens来实现, Drupal Gardens是一种CMS ,它在代码中增加了很多内容。 服务器端缓存将以最快的速度交付页面, 但是无需对预告站点使用CMS 。 只需抛出一个静态页面即可。

As it exists, the landing page is a giant middle finger to fan’s bandwidth, especially given that many of them will be using mobile devices to check out the site: they’re downloading a page that is literally 50 times larger than it should be.

确实存在,登陆页面是风扇带宽的巨大中指,尤其是考虑到许多人将使用移动设备来检出站点:他们正在下载的页面实际上比实际大小大50倍。

翻译自: https://thenewcode.com/735/The-Sauce

server酱

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值