如何提高此Web产品组合的加载速度? [英] How can I improve the loading speed of this web portfolio?

查看:73
本文介绍了如何提高此Web产品组合的加载速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在玩Google的Page Speed,它给了我一些提高网站加载速度的提示:

I've been playin with Google's Page Speed, and it gave me some tips to improve the loading speed of my site:

http://alexchen.zxq.net/(原始托管)

http://alexchen.co.nr (URL重定向)

我缩小了一些Javascript文件(没有压缩它们),并优化了一些图像,但是仍然有些慢.我不太确定我是否要重载某些内容或其原因,因为我使用的是共享免费托管 (我知道,我必须获得.net.com,但是我的信用卡现在有问题.)

I minified some Javascript files (I didn't compress them), and optimized some images, but it still kind of slow. I'm not very sure if I'm overloading something or its because i'm using a shared free hosting (I know, I have to get a .net or .com, but I'm having problems with my credit card right now).

有什么建议吗?

推荐答案

您的首页总共可以加载2.6mb,2.4mb的图像,即使您只有几个直接可见的图像也是如此.您应该推迟加载您的展示柜图像,例如 http://alexchen.zxq.net/images/showcase1. png ,直到单击缩略图.该图像大小为0.5mb,无论是否有人访问,都会在每次访问首页时加载该图像.请参见lightbox javascript库(例如facebox),它可以使用AJAX按需加载图像.

In total your homepage loads 2.6mb, 2.4mb of images alone even though you only have a few directly visible. You should defer loading your showcase images like http://alexchen.zxq.net/images/showcase1.png until the thumbnails are clicked. This image is 0.5mb and gets loaded on every homepage visit whether someone visits it or not. See a lightbox javascript lib such as facebox which loads up the image on demand using AJAX.

考虑将JavaScript的位置移到底部.由于脚本阻止并行下载,因此您应该最后加载这些脚本,以允许其他元素(如图像)下载.我对您的网站进行了分析,并且jquery似乎需要一段时间才能下载,从而阻止了其他文件的启动.

Think about moving the position of the JavaScript to the bottom. As scripts block parallel downloading you should load these last to allow other elements like images to download. I profiled your site and the jquery seems to take a while to download, blocking other files from starting.

还要为静态元素打开缓存,以减少第二次访问时的服务器请求.

Turn on caching for static elements aswell in order to cut down server requests on second visit.

安装YSlow以获得更多详细信息.

Install YSlow to get more details.

这篇关于如何提高此Web产品组合的加载速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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