We help IT Professionals succeed at work.

Clear request cache

tcalbaz
tcalbaz asked
on
Medium Priority
535 Views
Last Modified: 2012-05-05
Distinguished Gurus

My user places their order after they hit the submit key.  The next page uses request to read the fields from the previous page.  All is well.  However because they are impatient they start hitting the submit button several more times.  Each time they do this the page re-reads the request information from the previous page.

Whats the best way to stop this?

How can I clear out the request cache to nothing so the order doesn't get reprocessd.

Ultra Thanks

Ted
Comment
Watch Question

Commented:
try to disable the button with some javascript
i mean  it's hitted set it as  onClick = "document.getElementById('button's id here').disabled = true;"

Author

Commented:
Thanks Gee Orge

What I have is a situation where people are hitting the browser back button so I have to definitely clear the request cache if thats possible.

Ted

Commented:
Well let me understand

u have a form,
i fill this form and i sumbit it, then it goes into another page to thank me for filling the form, or there are many forms one after another.

if the data is don't need it any more u can simply use a response.Redirtect to some page to loose the POSTED data. so i someone hit the back button the he will tranferd at the first form that he has just submitted.

let me know if i helped u! :)

Author

Commented:
Gee Orte.

It seems that there is little one can do to prevent a user from hitting the browser back button or just retyping the URL.  
So far that best solution I can see is to flush and clear the page cache before moving to the "thank you for filling the form page"

I am open to a better solution if it exist.

Thank you

Ted

Commented:
Yes u can prevent to some one to hit the back button,
or maybe u can use some kind of javascript to clearbrowser's history, but this isn't a good idea.

I have made many forms, and one quick and realiable solution that i am using is to use a redirection to move to the last page, to avoid the data to be reposted when the user moves backwards.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.