Solved

HTML Cache

Posted on 2011-09-15
4
256 Views
Last Modified: 2012-10-30
Hi,

When I update a webpage, for some reason, when my client checks the updates, it does not display properly because of cache in the browser.

So, what is the way to force an update (not by F5 and Shift in browser) programmatically? What adverse affects can the method you describe have?

Thanks,

Ben
0
Comment
Question by:intangiblemedia
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
Finec earned 500 total points
ID: 36542908
Hi,

Use meta tags in head tag:

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" />
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />

Open in new window

or if you'd like to refresh page with JavaScript, use this:

location.reload(true);

Open in new window

0
 
LVL 4

Expert Comment

by:h4hardy
ID: 36565236
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" />
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE" />
0
 

Author Comment

by:intangiblemedia
ID: 36947856
Thanks guys...

Whats the difference between the 2 tags?

Cheers,

Ben
0
 

Author Comment

by:intangiblemedia
ID: 37955138
Thanks guys...

Whats the difference between the 2 tags?

Cheers,

Ben
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now