好文記錄與分享 網路科技

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

🏆 超過70萬名讀者已閱讀本站的內容,共同創造了105萬次總閱讀次數!

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.

我是 Larry,經營 B2B 軟體公司超過 10 年,也持續寫作超過 15 年。
我會持續分享自己對商業、科技與生活的觀察。

如果你喜歡這篇文章,也歡迎追蹤我的社群:
📌 Threads|日常觀察與商業思考
📌 FB|文章與生活分享
📌 IG|旅行、美食短影片