웹마스터 팁
.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>
제목 | 글쓴이 | 날짜 |
---|---|---|
확장 컴포넌트 아이콘 출력 하기 [2] | 귀머거리하늘 | 2013.10.18 |
통합게시판 만들기 [30] | Lansi | 2013.10.20 |
.htaccess 에서 캐시 설정(?) [1] | socialskyo | 2013.10.20 |
스케치북 1.7.2.1 게시판 상단 내용 오류 수정 방법 | 귀머거리하늘 | 2013.10.21 |
스케치북 1.7.2.1 게시판 닉네임 짤림 오류 임시 수정법 | 귀머거리하늘 | 2013.10.21 |
.htaccess 파일 관련 팁(웹 사이트 퍼포먼스 향상 및 트래픽 절감 효과) [21] | 서시빈목 | 2013.10.22 |
기본 URL 설정 팁 [4] | EvangelineA.K.Macdowell | 2013.10.25 |
xpresseditor에 한글 글꼴 추가 [2] | YJSoft | 2013.10.25 |
익명 게시판을 사용중일때 이미지 썸내일표시. | 말똥이 | 2013.10.27 |
XE1.7 사이트맵에서 권한설정시 특정그룹을 선택해 등록하면 권한이 등록 안 되는 버그 수정법 (추가) | sejin7940 | 2013.10.30 |
회원가입 확장모듈, 환영쪽지를 끄면 메일이 안날아가는 문제수정. | Xiso | 2013.10.31 |
회원가입 확장모듈 사용중 캡챠 실패시 재동의 안하기 | 말똥이 | 2013.10.31 |
게시판 가로사이즈 조절과 가운데 정렬 [1] | Filmfx | 2013.11.02 |
에디터가 활성화 되지 않을시... [1] | 똑디 | 2013.11.06 |
xe 1.7에서 이미지프로세스 상단 깨지는것~ [2] | 착한악마 | 2013.11.07 |
페이지로딩시 메모리 부족이란 오류메시지가 뜰때... | 똑디 | 2013.11.07 |
관리자만 글 등록이 되고, 일반 유저는 글 등록버튼을 누르면 아무런 반응이 없을 때. [1] | whitemind | 2013.11.07 |
XE 1.7.3.X 메뉴얼 [2] | 도라미 | 2013.11.08 |
XE CDN 서비스 중단에 대응하는 CDN 주소 변경법 (자신의 CDN서버로) [2] | Stellar | 2013.11.08 |
복권 모듈 가운데 긁었을때 반응하게 하기 [6] | 귀머거리하늘 | 2013.11.09 |
어느곳에 적어야 하는지...
잘몰라서요. 자세히 좀 알려주시면 고맙겠습니다.