I received a request to implement browser clear cache automatically when a user starts a session. This is the first time I encounter such a odd request.

Is clear browser cache for a web application a valid requirement for a web application? Should this be considered to be done manually?

Please help me on this matter. p.s.

I know where to ask the programmatic part of this issue on how can I do it, but I am asking: is it worth it from users perspectives and should this be done?

p.s. 2:

I store some data in the sessionStorage and I want that data cleared, on logoff or closed tab or other browser error that will force the user not to logoff

  • From UX perspective, I don't think this is an action users would expect from a site. However, if the application is going to be used on public computers, there may be an idea behind it. Could you tell us more about it? Commented Feb 26, 2013 at 14:34
  • I was asked to see if this was achievable, but this requires support for all browsers in order to achieve this. Commented Feb 26, 2013 at 14:35
  • If you're asking us to tell you if it's achievable then you're on the wrong site, we can't help you with such issues. However if you want to know if it's a good idea from a User perspective then that's a bit closer to being on topic here.
    – JonW
    Commented Feb 26, 2013 at 14:40
  • I know where to ask how can I do it, but I am asking : is it worth if from users perspectives and should this be done? Commented Feb 26, 2013 at 14:43
  • Any reasons I can think of for doing this would probably better require clearing the cache when the session ends rather than when it starts. There might also be some dark patterns (preventing recurring or accidental discount code cookies), but that benefits the business, not the user... Commented Feb 26, 2013 at 14:49

1 Answer 1


You should never perform an action that a user doesn't expect you to perform (outside of customer service of course). So the question then comes down to whether or not an average user would expect you to clear the cache.

If you are talking about gloabal cache clearing, then you should never clear it automatically whenever a user starts a session.

If you are only talking about the specific cache for a service then it may be a good idea if that service is somehow linked to privacy or security. But then it comes down to managing expectations, and you need to be sure that you inform and educate your users that this will happen whenever they start a session.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.