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
번호 분류 제목 날짜 조회 수
92 Server 파일 업로드 폴더 변경 2015.07.13 1955
91 Server 특정범위 안의 모든 문자 수 찾기 3 2012.06.19 7587
90 Server 초간단 웹서버와 파일서버 프로그램 file 2017.12.12 6290
89 Server 윈도우용 MEMcached 설치방법 1 file 2016.09.17 5180
88 Server 윈도우 time_wait 없애기 2016.03.08 3918
87 Server 윈도우 TCP 연결의 개수를 최대한 늘이기 2016.03.26 3477
86 Server 웹하드 서버 구축하기 2 file 2015.03.03 3277
85 Server 웹서버에서의 램디스크 엄청난 효과 비교하기 file 2016.11.27 4953
84 Server 웹 페이지에 HTML5 동영상 컨트롤 추가 10 2013.04.02 9458
83 Server 우린친구블로그 서버 다운해결방법과 MYSQL 실행 안될 때 복구방법 file 2017.06.21 5631
82 Server 오토셋과 apmsetup file 2016.02.17 2026
81 Server 아파치 캐시 설정 이후 잦은 아파치 자동멈춤 현상 원인분석 3 2016.03.23 2751
80 Server 아파치 성능테스트 프로그램 1 file 2013.04.03 14034
79 Server 아파치 모듈 mod_deflate 압축하기 1 2016.03.17 1351
78 Server 아파치 MPM 모드와 nginx 비교(apache 2.4 vs nginx) 2016.03.05 6494
77 Server 아파치 mod_cache mod_disk_cache 알아보기 7 2016.08.18 3096
76 Server 아파치 httpd.conf 재시작 없이 설정 적용하기 2016.03.26 4256
75 Server 아파치 ab 로 성능테스트 하기 2016.02.22 12357
74 Server 슈퍼캐시에서 .htaccess 이부분 제거해야 하나? 2016.11.23 4526
73 Server 서버 최적화 시키기(APACHE, PHP, MYSQL, XE 압축&캐싱&버퍼) 3 file 2016.03.18 6239
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소