1
최근에 웹 응용 프로그램로드 속도 (Laravel 5.1을 사용하여 빌드 됨)를 확인하고있었습니다. 그리고 나는 Leverage browser caching
을 발견했다. 그래서 나는 이것에 대한 해결책을 찾기 위해 그것을 봤지만 작동하지 않는 것 같습니다.Laravel 5.1 응용 프로그램 용 브라우저 캐싱 활용
는 그것은 다음과 같은 코드를 추가 언급되었다 : htaccess로의
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Feed
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images, video, audio
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 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
을 공개 디렉토리 내에. 그러나 나는 여전히 Leverage browser caching
에 대한 추천을 얻는다. 이걸 도와주세요. 나는 이것에 대한 해결책을 찾을 수 없다. 내가 페이지 로딩 속도를 확인
사이트는 다음과 같습니다
- Google 페이지 속도
- gtmetrix.com
당신에게
답장을 보내 주셔서 감사합니다. 그러나 문제는 여전히 동일합니다. font-awesome.min.css, bootstrap.min.css, jquery.min.js 등과 같은 모든 CSS 및 JS 파일에 대한 권장 사항이 제공됩니다. –
캐싱이 전혀 작동하지 않습니까? 아니면 그냥 그 중 일부입니까? – Lag
그것의 전혀 작동하지 않는다 –