Trying to implement *offline** *feature of *HTML5*.  Deployed in 
*apache2.2*with 
mod_wsgi plugin.
It works as expected (i.e., loads the cached page when offline) in chrome, 
Opera (using window.openDatabase) and other desktop browsers. However it 
doesn't work in Android 2.x, iPhone default browsers. Strangely, it works 
with Android 4.0 browser!!
Here is the code:

*HTML*

<!DOCTYPE HTML>
    <html manifest="{{MEDIA_URL}}cache.manifest">
       <head>
          <meta charset="utf-8">      
          <title>MyHomeStuff</title>      
          <script type="text/javascript" src="{{MEDIA_URL}}MyHomeStuff.js" 
></script>
          <script></script>
       </head>
       <body>
         .............
       </body>
    </html>


*Apache conf\mime.types**text/cache-manifest manifest*

*
*

*\Python27\Lib\mimetypes.py*
Added *'.manifest': 'text/cache-manifest'*, into *types_map *dict

(With the above addition to mimetypes.py, it started working for android 4.0)


*cache.manifest*CACHE MANIFEST
CACHE:index.htmlMyHomeStuff.js


*views.py:*

def offlineApp(request):
    t = get_template('index.html')
    html = t.render(Context({'MEDIA_URL':'http://myDomain.com/site_media/'}))
    return HttpResponse(html)


*Is it required to use any specific module/middleware to handle text/manifest 
in django ?*

Any help is appreciated. Already spent a lot of time on this!


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to