Solved

How can I make changes on a web page force update to browser?

Posted on 2014-12-04
4
159 Views
Last Modified: 2015-02-05
I maintain a web page for a client, and every month I have to change  links that stay the same name but the link is to a pdf file that changes. I need some code to force the browser to see the changes. I Have tried the <META HTTP-EQUIV="REFRESH" CONTENT="5"> I don’t like way that looks is there a better way?
0
Comment
Question by:Soupbone79
4 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
ID: 40480483
If you don't have full control over the webserver, and HTML is your only option, this is the most compatible option:

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

Open in new window

0
 

Author Comment

by:Soupbone79
ID: 40480503
Thanks I will give that a try and get back to you.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40481095
The caching client side is a user setting, and the markup is simply advisory.  The browser will not obey such directives unless the user cache setting permit it.

Cd&
0
 
LVL 58

Expert Comment

by:Gary
ID: 40481571
How are you linking to the pdf
In this case it would make more sense for the link to be to a php page, for example, and that page loads the correct version.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video teaches users how to migrate an existing Wordpress website to a new domain.

743 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

12 Experts available now in Live!

Get 1:1 Help Now