0

Has anyone been able to cache .aspx pages using the HTML cache manifest? I am porting an html application over to asp.net (and mvc2) and I get a 404 error when trying to cache any *.aspx page. Other files still cache normally (.js, .css, etc). I have changed permissions, handlers, and file names and still no luck. Below is the actual manifest:

CACHE MANIFEST
# This file was generated at 2/28/2011 4:03 PM
CACHE:
/Content/Site.css
/Content/Table_style.css
/Scripts/jquery-1.5.min.js
/Scripts/json.js
/Scripts/persist-all.js
/Views/Data/Details.aspx
/Views/Data/NotFound.aspx
/Views/Data/OffLine.aspx
/Views/Data/OnLine.aspx
/Views/Data/Test.aspx
/Views/Home/About.aspx
/Views/Home/Index.aspx
/Views/Shared/Error.aspx
Vito
  • 361
  • 2
  • 7
  • Are these ASPX pages dynamic? That's somewhat suggesting that they're not appropriate for HTML5 Application Cache. In any case, the spec notes that no-cache/content expiry rules are ignored when populating/fetching from the Application Cache, so... check that the browser adheres to this? – Stoive Mar 01 '11 at 00:55

1 Answers1

1

Every request goes through a controller, not directly to the view. Look at the url's in your browser, it never ends with .aspx (when using MVC).

It looks like you have a Data and a Home controller. Your urls will probably be something like:

  • /Data/Details
  • /Data/NotFound
  • /Data/OffLine
  • /Data/OnLine
  • /Data/Test
  • /About
  • /

These are the url's you need in your cache manifest.

ZippyV
  • 12,540
  • 3
  • 37
  • 52
  • Thank you very much! This was exactly the issue. I'm new to asp.net and mvc but this clarifies a lot. – Vito Mar 03 '11 at 04:08