I created a website based on ASP.NET 4. First I started the site by default, because it was created using the Visual Studio ASP.NET 4 Internet application template. I just clicked the Debug button and IE was launched, it connected to http://localhost:1341/and uploaded the default welcome page on my website. Everything seemed beautiful, so I started redesigning Index.cshtml.
After redesigning, I started the site again. And during the navigation, I noticed that if I click the "Back Browser" button, I will get the old version of the first page of the first page, and I need to click "Refresh" in the browser to get a new one.
So I added
<meta http-equiv="PRAGMA" content="NO-CACHE">
and
protected void Application_BeginRequest(object sender, EventArgs e)
{
HttpContext.Current.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
HttpContext.Current.Response.Cache.SetValidUntilExpires(false);
HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
}
to my site.
IE IE Options. Local\Temp.
304 " IE" "" .
- Cache- > Always refresh from server. , - , ?
Visual Studio . Script. Windows Internet Explorer, localhost... - , , IE, ""! Visual Studio ( ASP.NET Dev) "localhost"?
IE (, , ASP.Dev) / ? ?
, , ...