> ## Content Index
> Fetch the complete content index at: https://blog.hinablue.me/llms.txt
> Use this file to discover other available public pages before exploring further.

# [Apache tech.] 高性能網站建設指南
- URL: https://blog.hinablue.me/apache2-enable-mod-expires-and-high-performance-web-site/
- Published: 2008-09-18T09:53:00.000Z
- Updated: 2026-06-25T10:17:30.000Z
- Author: Hina Chen
- Tags: Work, Apache, mod_expires

文章來源：[《高性能网站建设指南》读后随感](http://www.dbanotes.net/web/high%5Fperformance%5Fweb%5Fsite.html?ref=blog.hinablue.me)

其實看這一篇應該就夠了，不過還有一個是 Apache2 對於 `mod_expires` 的應用，可參考：[Apache2 載入 Expires 的模組(mod\_expires) 與 設定](http://plog.longwin.com.tw/my%5Fnote-unix/2008/09/18/apache2-enable-mod%5Fexpires-2008?ref=blog.hinablue.me)

筆記一下。

於 .htaccess 或是 Apache 的設定檔加入

```
<IfModule mod_expires.c>
        ExpiresActive On
		ExpiresDefault "access plus 4 hours"
		ExpiresByType application/javascript "access plus 1 week"
		ExpiresByType application/x-javascript "access plus 1 week"
		ExpiresByType text/javascript "access plus 1 week"
		ExpiresByType text/css "access plus 1 day"
		ExpiresByType text/html A900
		ExpiresByType text/xml A14400
		ExpiresByType text/plain "access plus 1 hours"
		ExpiresByType image/gif "access plus 1 day"
		ExpiresByType image/jpg "access plus 1 day"
		ExpiresByType image/jpeg "access plus 1 day"
		ExpiresByType image/png "access plus 1 day"
		ExpiresByType image/bmp "access plus 1 day"
		ExpiresByType application/x-shockwave-flash A3600
</IfModule>

```

附帶一提，我在 blog 的 `.htaccess` 有加入這一項設定，不知道對於速度的反應各位覺得如何？