前回の記事に続いて、サイトの表示速度を改善しています。 今回は.htaccessブラウザのキャッシュを有効化する方法です。 .htaccessの編集 FTPソフトで.htaccessをダウンロードして、ローカルで編集しましょう。下記の記述を追加して、キャッシュさせるファイルの拡張子とキャッシュの期間を指定します。 ExpiresActive On ExpiresByType text/css "access plus 10 days" ExpiresByType image/gif "access plus 10 days" ExpiresByType image/jpg "access plus 10 days" ExpiresByType image/jpeg "access plus 10 days" ExpiresByType image/png "access plus 10 d