side effort / positive effect

My application code has the line

Response.Cache.SetCacheability(HttpCacheability.NoCache);

all places.

I would like to know if there's any side effect of removing this line? I appreciate if anyone can help.
LVL 1
minglelinchAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
Well, of course. Just lookup what this does:

It tells all components (web browsers and proxies) that that page should not be cached. This directive sets the Cache-Control header in the HTTP(S) response.

Removing this line allows the browsers or proxies to cache this page. Which will result in fewer calls to you server.
0
it_saigeDeveloperCommented:
But also poses a problem with regards to the protection (or non-protection) of sensitive information; e.g. - HIPPA standards would require that patient record information is not stored locally.  Turning off page caching is one way of meeting this requirement.

-saige-
0
minglelinchAuthor Commented:
Clicking 'back' on one and only that one page, it gives page expired error. I doubt the line.

I coded same as other pages. I'm wondering why only this one page gets this error.

Do you have idea?
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

ste5anSenior DeveloperCommented:
Error, what error?

You question is about effects..

Where does an error come from right now?
0
minglelinchAuthor Commented:
"Removing this line allows the browsers or proxies to cache this page. Which will result in fewer calls to you server."  ---  So fewer calls, then what would be the effect?
0
ste5anSenior DeveloperCommented:
For example, fewer resources used on your server, cause the page is not loaded from your server, but from an intermediate cache.

See ASP.NET Page Life Cycle Overview
and Setting the Cacheability of a Page.

The removal of your NoCache allows that your page is cached out-side the managed life-cycle of an ASP.NET. page.
Thus the information on the page may be outdated. Depending on the architecture, this means that invoking an action on the page may result in an error due to changed data. E.g. a missing session object.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
minglelinchAuthor Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.