We help IT Professionals succeed at work.
Get Started

PDF Cache Issue on Static HTML Page

Last Modified: 2012-05-08
Greetings Experts,

Here's the problem:
We have a database server generate a PDF file hourly that is uploaded vis Cron job to our webserver that overwrites the current PDF on a static HTML page;
Example www.example.com/test/test.pdf
test.pdf is overwritten every hour.
Server: Linux, Apache

Some users will see the most current PDF while others see only the cached version. All browsers (FireFox & IE) have same settings. Some of the users are going thru a Proxy Server, some not. We even check from our home.

I've seen the following JavaScript solution mentioned that adds ?ts to the .pdf extension:

function getTimeStamp()
var aDate = new Date();
var stamp = aDate.getTime();

return stamp;

I just don't understand how to implement this and is this possible on a static HTML page?

Help!  :)


Watch Question
This problem has been solved!
Unlock 1 Answer and 8 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