Skip to content
조회 수 1660 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

[Apache] mod_expires .htaccess을 수정하여 브라우저 캐싱하기


브라우저 캐싱으로 속도 가속화시키기


클라이언트에서 한번 열어본 이미지 등의 파일은 캐시 안함.


years
months
weeks
days
hours
minutes
seconds




#으로 되어있는 부분 없애고 아파치 재시작


httpd.conf

  LoadModule expires_module modules/mod_expires.so   




.htaccess


#<IfModule mod_expires.so>

ExpiresActive on

 

ExpiresDefault                          "access plus 1 month"

 

ExpiresByType text/cache-manifest       "access plus 0 seconds"

ExpiresByType text/html                 "access plus 0 seconds"

ExpiresByType text/xml                  "access plus 0 seconds"

ExpiresByType application/xml           "access plus 0 seconds"

ExpiresByType application/json          "access plus 0 seconds"

 

ExpiresByType application/rss+xml       "access plus 0 seconds"

ExpiresByType application/atom+xml      "access plus 0 seconds"

 

ExpiresByType image/gif                 "access plus 1 month"

ExpiresByType image/png                 "access plus 1 month"

ExpiresByType image/jpg                 "access plus 1 month"

ExpiresByType image/jpeg                "access plus 1 month"

   

ExpiresByType video/ogg                 "access plus 2 month"

ExpiresByType audio/ogg                 "access plus 2 month"

ExpiresByType video/mp4                 "access plus 2 month"

ExpiresByType video/webm                "access plus 2 month"

   

ExpiresByType text/x-component          "access plus 1 year"

ExpiresByType application/x-font-ttf    "access plus 1 year"

ExpiresByType font/opentype             "access plus 1 year"

ExpiresByType application/x-font-woff   "access plus 1 year"

ExpiresByType image/svg+xml             "access plus 1 year"

ExpiresByType application/vnd.ms-fontobject "access plus 1 year"                              

ExpiresByType text/css                  "access plus 1 year"

ExpiresByType application/javascript    "access plus 1 year"

ExpiresByType image/x-icon              "access plus 1 year"

#</IfModule>





## EXPIRES CACHING ##

<IfModule mod_expires.c>

    ExpiresActive On

    ExpiresByType image/jpg "access plus 1 month"

    ExpiresByType image/jpeg "access plus 1 month"

    ExpiresByType image/gif "access plus 1 month"

    ExpiresByType image/png "access plus 1 month"

    ExpiresByType text/css "access plus 1 month"

    ExpiresByType application/pdf "access plus 1 month"

    ExpiresByType text/x-javascript "access plus 1 month"

    ExpiresByType application/x-shockwave-flash "access plus 1 month"

    ExpiresByType image/x-icon "access plus 1 month"

    ExpiresDefault "access plus 1 month"

</IfModule> 





로그인 후 댓글쓰기가 가능합니다.

?

List of Articles
번호 분류 제목 날짜 조회 수
32 Server 초간단 웹서버와 파일서버 프로그램 file 2017.12.12 6302
31 Server APMSETUP7 PHP 업그레이드 2015.06.02 6377
30 Server 아파치 MPM 모드와 nginx 비교(apache 2.4 vs nginx) 2016.03.05 6516
29 Server XE 모바일 default 기본스킨 views 값 나타내기 file 2017.05.06 6822
28 Server 특정범위 안의 모든 문자 수 찾기 3 2012.06.19 7588
27 Server MYSQL 튜닝 이정도는 해야되지 않겠나? 2 file 2012.07.16 7995
26 Server XE Xpress Engine 사이트맵에서 메뉴추가시 저장 안되는 현상 2012.05.12 8263
25 Server php) 변수명을 변수값으로 지정방법 10 2013.03.23 8289
24 Server php) register_globals = on 으로 설정할 수 없는경우 10 2013.03.23 8528
23 Server FileZilla FTP SERVER 패시브모드 셋팅방법 file 2016.12.22 8804
22 Server mysql 테이블 손상시 #1146 - Table 해결방법 file 2016.07.17 8924
21 Server 웹 페이지에 HTML5 동영상 컨트롤 추가 10 2013.04.02 9464
20 Server APACHE PHP 에러 잡기 1 2016.03.23 10017
19 Server PHP) Example #1 HTML 엔티티 디코딩 13 2013.04.02 10188
18 Server html) 프레임 나누기 4 2013.03.02 10214
17 Server 서버 다운시 알람 기능 사용방법(http ping port) file 2017.05.04 10378
16 Server make ping with PHP(핑테스트) 11 2013.04.01 11160
15 Server TIME_WAIT를 남기지 않는 세션종료 (Graceful Shutdown) 3 2013.03.02 11185
14 Server php) 이미지 사이즈 구해서 0이면 게시물 내용 없애기 2013.07.05 11295
13 Server Windows 서버에서 XE 속도 대폭 개선 방법 3 2013.03.02 11628
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소