On Thu, Feb 21, 2013 at 3:38 PM, Ranjith Chaz <ranjj...@gmail.com> wrote:
> 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: > > *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 ?* > > No - you just have to return a response that sets the content type: return HttpResponse(html, content_type='text/cache-manifest') Yours, Russ Magee %-) -- 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.