You are viewing limited content. For full access, please sign in.



Force Web Forms to load from the server

asked on August 9


Is there anyway to force a web form to load from the server instead of from the browser cache.  We are using Laserfiche Forms Professional Version

There are times of the year when we have public users submitting one specific form several times with different documents attached to each instance.  The first submission usually works fine but successive submissions of the form sometimes drop the attached documents.  The form submits and triggers our workflow but the documents do not get carried in to the repository.

We are fairly sure this is caused by the user's browsers hanging on to cached instances of the form.

Is there any way to configure LaserFiche Forms to force the form to reload from the server? 


0 0


replied on August 9

Try using the following javascript. location.reload(true) performs a reloads without using any cached elements (IE: Ctrl+F5), but you have to use some sort of trick to prevent it from firing in an infinite loop. There are lots of ways to do this, this one adds a harmless character to the URL.



            //Check if the current URL contains '#' 
                // Set the URL to whatever it was plus "#".
                url = document.URL+"#";
                location = "#";

                //Reload the page



1 0
replied on August 19

Chad, thank you very much for this.  We have previously run hundreds of tests on this form and the only thing that ever seemed to allow it to repeatedly import documents without randomly dropping attached files was to insist our clients do a hard refresh on the form every time.

Your script does that quite nicely for them.  After implementing the script, we ran a truckload of our own tests and have not lost a file yet - even with using the back button!

So thank you again.

1 0


replied on August 9

Before you go to these lengths, I'd talk to support (if you haven't already). Caching affects content and data retrieved from the server, but it doesn't affect data sent to the server. Anyway, from what I'm seeing, Forms seems to be managing it's cache appropriately.

This may be a bug, but I don't believe that invalidating the cache on every page load will do anything but cause adverse performance.

2 0
replied on August 9

Like Devin said, definitely talk to support. One thing to test would be reopening the form vs pressing the "back" button in the browser.

I've noticed some unusual/unexpected behavior on forms when I click the browser's back button after a submission, especially on more complex ones.

After submission, do you show a "thank you" page, or do you redirect them to another page?

With forms that can have several sequential submissions I put a link on the "Thank You" page that prepopulates common information through URL parameters to make it easier on them and to discourage using the "back" button in the browser.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.