웹마스터 팁
.htaccess 에서 캐시 설정(?)
2013.10.20 17:40
펌이라 팁이라고 하긴 그런데...제가 실제 효과를 본거 라서 팁란에 적어 봅니다.
저는 일단 웹호스팅 사용하고 있고...php5.2 인가 그렇다고 하더군요...아래 두 부분 적어 주고 나서 조금(1%) 아주 쪼금은 빨라진것 같습니다.
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=edge"
# `mod_headers` can't match based on the content-type, however, we only
# want to send this header for HTML pages and not for the other resources
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 year"
# Data interchange
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"
# Favicon (cannot be renamed!)
ExpiresByType image/x-icon "access plus 1 week"
# HTML components (HTCs)
ExpiresByType text/x-component "access plus 1 month"
# HTML
ExpiresByType text/html "access plus 0 seconds"
# JavaScript
ExpiresByType application/javascript "access plus 1 year"
# Manifest files
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Media
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
ExpiresByType image/ico "access plus 1 month"
# Web feeds
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"
# Web fonts
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
</IfModule>
댓글 1
제목 | 글쓴이 | 날짜 |
---|---|---|
로그인 포인트 출력 위젯을 수정해보자 | [花穗] | 2009.03.27 |
글 읽을 때마다 조회수 증가하는 법 알려주세요 [1] | 홍정환873 | 2009.03.27 |
(CSS) IE8용 웹조각 기능 | Simulz | 2009.03.26 |
각종 좌절 금지 그림들 [2] | winter548 | 2009.03.23 |
제로보드의 아이콘을 내 맘대로 변경하기...(2) [2] | winter548 | 2009.03.23 |
제로보드의 아이콘을 내 맘대로 변경하기...(1) [3] | winter548 | 2009.03.23 |
1.2.0 업뎃후 위젯 문제 [1] | ♡不明♡ | 2009.03.22 |
제로보드 XE나 개인 블로그에 GPS 로그(궤적)를 나타낸 구글맵 삽입하기 | 상오기 | 2009.03.21 |
미국 야후 호스팅 쓰시는 분들 보세요(이미지 퍼미션) | 텍사수 | 2009.03.21 |
왕초보용 xe 1.2.0 버전 사용 기본 레이아웃 좌측에 배너 삽입 방법. [7] | 『june™』 | 2009.03.20 |
페이지모듈에서 내용직접추가할때 "본문내이미지조절" 애드온 적용하기 [5] | 왜만지냐 | 2009.03.19 |
브라우저 크기에 따라 본문 가로 크기 자동 조절 [1] | 개돌 | 2009.03.18 |
1.2.0 설치 후 페이지모듈에 위젯사용시 문제 [2] | Digitalife | 2009.03.17 |
XE DB 백업한거 복원 하기 [2] | 라르게덴 | 2009.03.17 |
관리자 페이지 (module=admin) 백지 문제 [5] | 개돌 | 2009.03.17 |
추천 비추천 레벨 권한 [4] | 한이73 | 2009.03.17 |
제로보드에서 아이프레임(iframe) 높이 자동조절(파폭,IE, 모두 작동) [10] | HaruKaze | 2009.03.17 |
각종 스킨 파일 보호 하기 (HTML 소스 보기 방지법) [18] | 퍼니엑스이 | 2009.03.16 |
확장변수 출력 방법 초 심플하게 적어봅니다. [15] | 라르게덴 | 2009.03.16 |
게시물 가운데 정렬 문제 임시해결법 | 한신일 | 2009.03.15 |