Skip to content
조회 수 1658 추천 수 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 아파치 캐시 설정 이후 잦은 아파치 자동멈춤 현상 원인분석 3 2016.03.23 2773
31 Server innodb_use_sys_malloc to FALSE 2016.08.24 2637
30 Server mysql 16CPU / 16GB My.cnf 1 2016.07.26 2501
29 Server XE <title>제목 - 사이트명</title> 으로 변경방법 2016.04.19 2057
28 Server 오토셋과 apmsetup file 2016.02.17 2026
27 Server XCOPY로 중요파일 백업하기 2016.03.26 1981
26 Server 파일 업로드 폴더 변경 2015.07.13 1955
25 Server XE Request 줄이기 file 2016.09.07 1937
24 Server XE Content font-size:수정방법 file 2016.04.19 1865
23 Server PHP Opcache 속도개선 시키기 2016.03.07 1832
22 Server xe 타이틀 게시판 이름 없애기 file 2016.06.28 1821
21 Server Apache에 대한 mod_proxy 지원 구성 2016.09.06 1801
20 Server 서버 부하상태 체크 file 2016.04.30 1709
» Server [Apache] mod_expires .htaccess을 수정하여 브라우저 캐싱하기 2016.03.16 1658
18 Server XE file cache 활용 2016.08.19 1648
17 Server [아파치 error.log] Fatal Error Unable to reattach to base address file 2016.03.25 1643
16 Server MySQL 5.6 my.cnf 글로벌 변수인지 세션변수인지 확인 2016.03.24 1527
15 Server XE성능 캐시활용으로 속도 100배 개선하기(Varnish 캐시서버 + XE(+패치) + nginx(혹은 아파치) / Wincache) file 2016.03.04 1449
14 Server XE 업데이트 후 모듈업데이트가 안될때 참고 file 2015.03.13 1440
13 Server XE 리퍼러 모듈로 트래픽 발생에 대처방법 file 2016.04.17 1410
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소