Solved

No Cache PDFs

Posted on 2007-11-26
3
3,638 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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