user2232273
user2232273

Reputation: 4974

Files are not cached

i use the cache.manifest file to view my project in offline and all works fine.

but the only thing doesn´t cache are the libraries for my gallery slider. i dont know why.

can me anybody give me a hand with that?? i have tried a lot of things during three days but i can not understand why this happen. have change a lots of directories to see if the problem are the path. but nothing work.

Note: i use two times the libraries because i use the gallery in index.html and Destaque.html

the libraries i want to cache are this:

elastislide.css
modernizr.custom.17475.js
jquery.elastislide.js
jquerypp.custom.js

and my cache.manifest file look like this:

CACHE MANIFEST

index.html
boilerplate.css
master.css
elastislide.css
jquery.mobile-1.3.1.min.css
jquery.bxslider.css
css/shCore.css
css/shThemeDefault.css
flexslider.css
social-likes.css
imagens/Horizontal/HomeHorizontal2.jpg
imagens/Horizontal/2.jpg
imagens/Horizontal/2.2.jpg
imagens/Horizontal/3.jpg
imagens/Horizontal/3.1.jpg
imagens/thumbsContactos/33.jpg
imagens/thumbsContactos/34.jpg
imagens/thumbsContactos/35.jpg
icon/apple-touch-icon-57x57.png
icon/apple-touch-icon-72x72.png
icon/apple-touch-icon-144x144.png
icon/close_pop.png
icon/mail-icon.png
icon/plus2.png
icon/video-icon.png
icon/facebookicon.png
images/bg_direction_nav.png
images/icons-18-black.png
images/icons-18-white.png
images/icons-36-black.png
images/icons-36-white.png
http://www.youtube.com/embed/tqNCu-wPT6k?rel=0
http://www.youtube.com/embed/YtAZU2diFVE?rel=0
jquery-1.9.0.min.js
jquery.mobile-1.3.1.min.js
modernizr.custom.17475.js
jquery.elastislide.js
jquerypp.custom.js
offlinetest.js
js/modernizr.js
social-likes.js
jquery.bxslider.js
respond.min.js
jquery.flexslider.js
modernizr.custom.17475.js
jquery.elastislide.js
jquerypp.custom.js
js/shCore.js
js/shBrushXml.js
js/shBrushJScript.js
Destaque/js/modernizr.custom.17475.js
Destaque/js/jquery.elastislide.js
Destaque/js/jquerypp.custom.js

Network:
*

Fallback:
offline.html

Upvotes: 0

Views: 711

Answers (1)

Gustavo S. Rodrigues
Gustavo S. Rodrigues

Reputation: 187

You can use the cache htaccess.

Ex: .htaccess

ExpiresActive On
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"

# Feed RSS - 1 hora
ExpiresByType application/rss+xml "access plus 1 hour"

# Favicon - 1 week
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"

# Images, video, audio - 1 week
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"

ExpiresByType video/ogg "access plus 1 week"
ExpiresByType audio/ogg "access plus 1 week"
ExpiresByType video/mp4 "access plus 1 week"
ExpiresByType video/webm "access plus 1 week"

# Webfonts - 1 year
ExpiresByType font/truetype "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType font/woff "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"

# CSS / jScript - 5 days and 2 hours
ExpiresByType text/css "access plus 5 days 2 hours"
ExpiresByType application/javascript "access plus 5 days 2 hours"
ExpiresByType text/javascript "access plus 5 days 2 hours"

Upvotes: 2

Related Questions