Expand my Community achievements bar.

Rendered PDF form content caching in the web browser...

Avatar

Former Community Member
Is there anyway to force the pdf content to not cache in the web browser?? I am using form server to render my pdf document (using SOAP) and the data that I previously entered is cached. Not only is this annoying for testing purposes, but I do not want this to be an issue for my users since supervisor's will most likely be reviewing many forms from different people. Is this something I can set on the form server or within designer?



I am wondering if this is some of the issues I am running into with testing. I am using servlets and my code is with doget, so I can refresh the browser easily, but it is annoying and the refresh doesn't work 100% of the time. I've even tried deleted all my internet files and the content is still cached! But I cannot rely on the browser settings anyway since my users are coming from all over.



Thanks,

Jennifer
9 Replies

Avatar

Former Community Member
ok, did a search on the designer forums and found an "answer":

----------------------------------

Try adding the following script to the initialize event of your form:



event.target.nocache = true;

----------------------------------



I gave it a try, but it does not work. Anything else??



-Jennifer

Avatar

Former Community Member
There's a setting in acrobat / reader that controls cacheing of user data on the client side. Start acrobat / reader, and go to edit > preferences. Under forms, there should be a setting for keeping form data temporary available on disk. Uncheck that and see if this fixes your problem.



Cheers



David

www.ensemble.com

Avatar

Former Community Member
Thanks David.



I am doing that for now while testing, but I really need something within the form and not have the user's rely on this setting (our users are coming in from all over and I have no idea what their environment is).



Thanks,

Jennifer

Avatar

Former Community Member
I would investigate the situation under which the data is being cached. Does the same caching problem still occur, if the URL is different each time? You can have simple servlet code that will render the form on the fly on request, as well as creating unique URLs each time the PDF is being served. I think this may resolve your problem.



Cheers



David

http://www.ensemble.com

Avatar

Former Community Member
Hello David,



Thanks for the suggestion. I am already using a different URL, as in http://hostname:8080/dd?id=XYZ and id=ABC type of different URL's. So, I am rendering a different file each time using SOAP requests to the Form Server, so I am just getting frustrated on how to resolve this.



Thanks,

Jennifer

Avatar

Former Community Member
I had the same problem and this works for me. (Se text below)

/Thomas



----- form1::ready:form - (JavaScript, client) ---



var oDoc = event.target;



oDoc.nocache = true;

Avatar

Level 6
This problem is horrific. If not for this forum, I never would have found this problem. Thomas, thank you for posting your solution. It works like a dream.



Jared Langdon

Avatar

Former Community Member
Could you please post the entire page contents that also shows the Javascript and how to use it? Thanks.

Avatar

Former Community Member
Can someone please explain how to do this, I am having the exact same problem but my forms aren't generated, they a pre-built and hosted on a site.

TIA