0
我在c#,mvc中創建登錄。它工作正常。退出也正常工作。 但是用戶退出後,如果用戶按下後退按鈕,它會跳轉到我登錄成功後重定向的頁面。我試着將其添加到global.asax.cs
。但它不起作用。而且我嘗試使用JavaScript。當時如果用戶按下後退按鈕,它會顯示頁面並消失。我能爲此做些什麼?爲什麼它登錄時,按c#中的瀏覽器後退按鈕,mvc
這是我試圖用C#
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
protected void Application_BeginRequest()
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.UtcNow.AddMilliseconds(-10));
Response.Cache.SetNoStore();
}
請幫我這個