Click here to Skip to main content
16,021,430 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends,

I am developing one offline application with ASP.Net MVC. When the user visit the page online, the page data will be stored in the browser LocalStorage and I am referring HTML manifest file in the MVC Layout page. When the user login to the application, the manifest file(all images, scripts, page name) getting loaded into the browser cache.
During offline the pages are navigating properly. If the user saving the data online it is getting saved in database and while going to offline the existing page with corresponding existing model data only coming. New date not loading into page.
The App cache not getting cleared.

Can you please help me how to clear and reload the manifest file in browser app cache?

Thanks in Advance,
Vivek.

What I have tried:

1. I tried with the following code in my layout page,

<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Expires" content="-1" >
<meta http-equiv="Pragma" content="no-cache">


2. tried the below code in home controller index action method,
Response.ContentType = "text/cache-manifest";
          Response.ContentEncoding =
              System.Text.Encoding.UTF8;
          Response.Cache.SetCacheability(
              System.Web.HttpCacheability.NoCache);


The above two things was not working. So Please help me.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900