0

I am trying to redirect the user to a offline page when he is disconnected but i have a problem.

I noticed that the manifest file is never loaded by the browser

this is my manifest attribute

<html lang ="fr" manifest="@Url.Action("Manifest","Acceuil")">

this is my response with fiddler when i ask the url directly

 HTTP/1.1 200 OK
    Cache-Control: private
    Content-Type: text/cache-manifest; charset=utf-8
    Server: Microsoft-IIS/10.0
    X-AspNetMvc-Version: 5.2
    X-AspNet-Version: 4.0.30319
    X-Powered-By: ASP.NET
    Date: Sat, 23 Jul 2016 16:08:42 GMT
    Content-Length: 216

and this is my manifest

    CACHE MANIFEST
CACHE:
FALLBACK:
/ /OffLine/Index
NETWORK:
   *

my window.applicationCache value is always equal to uncached

how can i do to fix my problem ?

thank you

ragnar
  • 150
  • 1
  • 6

3 Answers3

0

There doesn't seem to be anything wrong with the manifest file itself except some extra whitespaces that you could remove.

About the headers, you should not cache the manifest file itself. So cache-control should be changed to something other, perhaps no-cache. Otherwise it's loaded only once and you will have problems updating it for you users if it will ever change.

0

always the same problem, I noticed that the browser does not get my action which contains my manifest.

    HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/cache-manifest; charset=utf-8
Expires: -1
Server: Microsoft-IIS/10.0
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-SourceFiles: =?UTF-8?B?QzpcTm91dmVhdSBkb3NzaWVyXGIuZS5wLncuaVxDb3VjaGVXZWJcQWNjZXVpbFxtYW5pZmVzdA==?=
X-Powered-By: ASP.NET
Date: Mon, 25 Jul 2016 07:41:45 GMT
Content-Length: 77
ragnar
  • 150
  • 1
  • 6
0

I found my error, i will never forget it !!!

before

@using System.Web.Optimization
@Styles.Render("~/bundles/css/layout")
<html   manifest="/Acceuil/Manifest">
<head>

after

   @using System.Web.Optimization
<html   manifest="/Acceuil/Manifest">
<head>
    @Styles.Render("~/bundles/css/layout")    
ragnar
  • 150
  • 1
  • 6