开发者

html5 offline cache, not working with some dynamic content that uses htaccess

Im trying to make offline verison of page, but dynamically generated pages are not caching.

When I restart browser and turn on offline mode i cant access search.html(it is dynamic content page, created by YII Framework)

but i can access all statics files like css and js.

Things i have:

.htaccess

RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

RewriteRule ^admin admin.php

cache.manifest

CACHE MANIFEST


CACHE:

/
/search.html
/index.php
/css/screen.css
/css/print.css
/css/main.css
/css/form.css
/assets/aa1d1537/jquery/css/redmond/jquery-ui.css
/css/jquery.lightbox-0.5.css
/开发者_StackOverflow中文版assets/6e74162b/jquery.js
/js/main.js
/images/spacer.gif
/js/lightbox/jquery.lightbox-0.5.min.js
/js/lightbox/init.js

manifest in html tag

  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" manifest="/cache.manifest">

any ideas whats should i do?


I'll guess you already checked that, otherwise you won't be able to see css etc. but did you configure your apache server (if you're using this one) to serve the manifest corectly?

For example add a .htaccess file with the folowing content

AddType text/cache-manifest .manifest


Send some caching information with the dynamically generated pages.

e.g. see this page (except for the bit about HTTPS - which is completely wrong)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜