Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8339787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:58:41+00:00 2026-06-09T04:58:41+00:00

I know this question has been asked before but I’m confused as to the

  • 0

I know this question has been asked before but I’m confused as to the best approach so please forgive me asking again…

I have an MVC3 application that will be an extranet, allowing users to log in, via Forms Authentication. The users will be accessing confidential information so, in order to prevent somebody from hitting Back after they log out (and I SignOut of FormsAuthentication), I have disabled all caching, forcing the redirection to the logon page.

Everything works well from a security point of view, but my problem is that I’d like to cache the non-secure elements of the page, such as images, backgrounds, logos, etc.

At the moment, each page renders with an ugly flicker, because all my artwork is being downloaded each time.

Of course, this also has a negavtive impact on bandwidth too.

How can I control the caching such that the artwork, css, scripts, etc. get cached whilst preventing the dreaded Back button after FormsAuthentication SignOut problem?

Thank you in advance,

Simon.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:58:43+00:00Added an answer on June 9, 2026 at 4:58 am

    Assuming the images are not dynamically generated you can either do it internally via MVC or using IIS.

    Internally you’d need to serve all your images and set expires by.

    If your using IIS it becomes much much simpler, you just edit the expires header in the IIS Custom headers section to a date in the future (a date in the past auto expires it). If you wish to ensure an image is not cached add a query string to it

    <img src="image.png?dummy=8sn7ahh2" />
    

    Then the image wouldn’t be cached too so you basically want to cache all images and then black list (using query string) the ones you don’t want cached.

    Heres a nice example on how to switch it on/off for IIS7

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question has been asked before numorous times but they seem to
I know this question has been asked before, but non of the solutions solve
I know this question has been asked before, but I haven't been able to
Yes, I know this question has been asked before, but I can't find an
Alright, I know this question has been asked before, but mine has a different
I know this type of question has been asked and answered before but I
I know that this sort of question has been asked here before, but still
I know this question has been asked before, but none of the previous answers
I know this question has been asked here before, but I don't think those
I know this sort of question has been asked before , but I still

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.