好文記錄與分享 網路科技

[好文分享] 加速網站的最佳實踐 Best Practices for Speeding Up Your Web Site

FB公開社團 Larry的午茶時光
加入不需審核,歡迎讀者加入~
我的IG帳號: larry.time.taste。剛剛起步,歡迎大家追蹤~

Yahoo Developer 關於加速網站的好文
https://developer.yahoo.com/performance/rules.html

1. Reduce http requests: using CSS sprites is a good example.

2. Static cache expiration: set the expiration to never or long time.

3. Gzip components.

4. Put stylesheets at the top: for progressive rendering.

5. Put scripts at the bottom: avoid downloading 2 or more components in parallel (don't let downloading javascript block downloading html and assets.)

6. Make JavaScript and CSS external: then they can be cached in the client. But note the JS with template language still stays in html.

7. Minify JavaScript and CSS.

8. Remove duplicate scripts: review if your html contains duplicate scripts.

9. Make Ajax cacheable: need a timestamp to judge if really need to submit a request.

FB公開社團 Larry的午茶時光
加入不需審核,歡迎讀者加入~
我的IG帳號: larry.time.taste。剛剛起步,歡迎大家追蹤~