Solved

No Cache PDFs

Posted on 2007-11-26
3
3,650 Views
Last Modified: 2013-11-19
I am building a bunch of PDFs with fillable form fields for work.  I will host these PDF's online (company website).  I've already figured out how to clear these forms when they are loaded using the attached code.
This function works great when the PDFs are stored locally (on the computers hard drive) but I noticed when the PDFs are hosted online the data doesn't get cleared.  So if a user logs into a PDF from their web browser and then goes back into the PDF at a later point in time the data they entered into the form remains :(

How can I make sure the data doesn't get cached in a browser?

p.s. I am using "Adobe Acrobat Pro v7" to create these PDFs
// variable to store whether document has been opened already or not
var bAlreadyOpened;
 
function docOpened()
{
 
  if(bAlreadyOpened != "true")
  {
    // document has just been opened
    this.resetForm();
    // now set bAlreadyOpened to true so it doesn't
    // run again
bAlreadyOpened = "true";
  }
  else
  {
    // document has already been opened
  }
}
 
// call the docOpened() function
docOpened();

Open in new window

0
Comment
Question by:basskozz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 20364533
There is a setting in Adobe Reader/Adobe Acrobat that determines if a form gets cached locally. You have to set this on every computer that you want to use the form. Open up Acrobat's preferences and go to the "Form" category. Uncheck the setting "keep forms data temporarily available on disk".

You could add some logic to your form that determines when the form was last used (e.g. save a date in a hidden form field). If the date is older than the current date, ask the user if they want to clear the form data. Other than that, you need access to your clients computers, or instruct them to uncheck that setting manually.
0
 

Author Comment

by:basskozz
ID: 20393846
Nevermind...
I found this: http://support.adobe.com/devsup/devsup.nsf/docs/53773.htm


this.nocache = true;

Open in new window

0
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 500 total points
ID: 20395296
Just keep in mind that this property was introduced in Acrobat 7, so for any older version of Acrobat or Reader, it's still necessary to use the setting in preferences.
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 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