0

i have a MVC razor webpage, after login i show additional menu-options in my navbar with this code:

@if (Request.IsAuthenticated)
                {
                    <div class="navbar-collapse collapse navbar-inverse-collapse">
                        <ul class="nav navbar-nav">
                            <li id="menuOptionDevices">
                                @Html.ActionLink("Översikt", "Devices", "Home")
                            </li>
                        <ul class="nav navbar-nav pull-right">

                            <li>
                                @Html.ActionLink("Logga ut", "Logout", "Home")
                            </li>
                        </ul>
                    </div>
                }

When i go back to the login-page i don't want to show these options, i do a auth logout in the controller:

public ActionResult BetaLogin()
{
    FormsAuthentication.SignOut();
    return View();
}

But the menu-options are still shown, if i F5 they dissapear. What am i doing wrong?

tereško
  • 58,060
  • 25
  • 98
  • 150
Lord Vermillion
  • 5,264
  • 20
  • 69
  • 109
  • It must be loading the page from cache, you may try using 'must-revalidate' header – Babu James Feb 09 '15 at 10:07
  • See http://stackoverflow.com/questions/2932890/http-cache-control-max-age-must-revalidate and http://stackoverflow.com/questions/18148884/difference-between-no-cache-and-must-revalidate – Babu James Feb 09 '15 at 10:09

0 Answers0