Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

HTML Cache

Posted on 2011-09-15
4
Medium Priority
?
271 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

963 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