Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Clear cache after submit.

New Here ,
Dec 27, 2009 Dec 27, 2009

Hello all,

I'm new to coldfusion, and want to know is there a sulution to clear the cache after submitting a cfml page, coz when refreshing the page (F5) it submits the form again..

thank you

TOPICS
Getting started
840
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 27, 2009 Dec 27, 2009

If you have a page that processes a form, and you refresh it without resubmitting the form, what would you expect to happen?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 27, 2009 Dec 27, 2009

so is that the normal behaviour ?

I mean once the form submitted, there's no need to keep all the form values in the browser cache, and i asked if there a solution to cheat that issue ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 27, 2009 Dec 27, 2009

Yes that's the normal behavior if you use method = post when submitting your form.  If you use method = get the form variables become url variables and you may not have to re-submit the form on a page refresh.  I don't know for sure because I never use method = get.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 27, 2009 Dec 27, 2009

ok, i see, thank you, it was helpful

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2009 Dec 27, 2009
I mean once the form submitted, there's no need to keep all the form values in the browser cache

That is a matter for the browser to decide. There are times when the client wishes to keep the form values.

i asked if there a solution to cheat that issue ?

Yes. Use the form's action attribute to specify an action page that is distinct from the form page.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 27, 2009 Dec 27, 2009

Seems to be good solution to set form action to different page

as i said, i'm new to coldfusion and still thinking C#

anyway it does matter.

thank you guys

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 27, 2009 Dec 27, 2009
LATEST
as i said, i'm new to coldfusion

Nevermind. We all are, in a way. Coldfusion is growing all the time.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources