Jump to content

Using Mime Typ Text/cache-Manifest And "best Practice" For Webapp Caching On Local Mobile Device


mr-fan
 Share

Recommended Posts

Hi Guys,

i've search the forum via g* and found some interesting stuff on building apps with PW - but i've nothing found on some specific tasks for better performance and other issues...may someone like to share some hints or tipps?

- using text/cache-manifest and setting it up via .htaccess like

AddType text/cache-manifest .manifest

->are there any problems or other relevant things that i've have to keep in mind - i'm not very experienced in using much .htaccess "magic" on my former systems this was not needed - and the PW .htaccess looks quit complex....

- any experience on using a CACHE MANIFEST f.e. to cache js, jquery and css that is used by the webapp?

or is there even more possibilitys with PW i've read about a setup where a Manifest is used to output different while the user is online or offline like this example code:

CACHE MANIFEST
# 2010-06-18:v2

# Explicitly cached 'master entries'.
CACHE:
/favicon.ico
index.html
stylesheet.css
images/logo.png
scripts/main.js

# Resources that require the user to be online.
NETWORK:
login.php
/myapi
http://api.twitter.com

# static.html will be served if main.py is inaccessible
# offline.jpg will be served in place of all images in images/large/
# offline.html will be served in place of all other .html files
FALLBACK:
/main.py /static.html
images/large/ images/offline.jpg
*.html /offline.html

My App (Website) will perform two things - listing things (could done via JSON and the great Module from Ryan PageServices) and some forms to push new items on the Website so my idea is - that if the user is offline only provide the listings and pulled content and hide the formpart until he have a connection.

For a real offline-first App (save the data in local database or using tools like hood.ie or pouchDB) there is no "real" budget to hire a dev - so this would be a mobilefirst "Website" no real App - and my effort is now to give just some functionality get working in the "offline" mode.

Any hints, tricks, tipps, links or warnings are appreciated...

Best Regards mr-fan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...