We help IT Professionals succeed at work.
Get Started

Forcing a Hard Refresh of cached website - in code?

Last Modified: 2015-06-30

Is there anyway (in code) to force a complete refresh of a website?

in a browser, I usually use ctrl F5
However, I need to the code to handle it on demand

Is this possible?

the idea is to write a cookie with the Version ID, and if the Version on the login page is different to that in the cookie then it must get a fresh copy and not use the cache

I know you can use Meta tags for No-cache etc, but would welcome some more insight

a possibility is to append the HTML with the no-cache meta tag (using asp.net) if the version ID's are different
but i'm not sure if its cross browser compliant etc

advice appreciated
Watch Question
Technical Expert
Top Expert 2014
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE