Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

Firefox fails to submit self-referential form unless I wait 20-30 seconds.

  • 3 отговора
  • 10 имат този проблем
  • 4 изгледи
  • Последен отговор от cor-el

more options

EDIT: (The solution ended up being, against all expectation, that everything was actually perfectly fine. It was the -webhost- that was messing it up. Note to anyone who comes across this: GoDaddy is terrible for hosting. The same files, uploaded to a real webhost like SourceForge, work perfectly well. What GoDaddy can possibly be failing at, I can't even imagine.)

I am creating a self-referential form (POST method) in PHP to lead a user through the process of a complicated, branching calculation. I load the PHP in Firefox 3.6 and it comes up fine, and I do the first submission and that works fine. But if I do another submission quickly (within a few seconds), instead of working, it submits to itself with no fields so I get the front page back again, and no matter what I do, it keeps submitting with no fields. If I then reload the original PHP file not via POST and redo the first submission, the first submission works again and the second fails again.

However, if I do the first submission, and then sit there doing absolutely nothing for maybe 20-30 seconds, and then do the second submission, it works perfectly fine. If I again wait, the third submission works; otherwise, it submits like the first with no fields and messes up.

I tried this with and without HTTP headers to prevent caching, without effect.

Any ideas what's going on?

Edit: (And, to be clear, if I change POST method to GET method, it works flawlessly every time. But having the data appear in the URL is confusing and problematic for users, as well as severely complicating the process of bookmarking if the user decides in the middle of the calculation to make a bookmark. The bookmark should be to the beginning of the calculation, not the middle, because the calculation is time-sensitive so old data are useless and should not be re-produced.)

EDIT: (The solution ended up being, against all expectation, that everything was actually perfectly fine. It was the -webhost- that was messing it up. Note to anyone who comes across this: GoDaddy is terrible for hosting. The same files, uploaded to a real webhost like SourceForge, work perfectly well. What GoDaddy can possibly be failing at, I can't even imagine.) I am creating a self-referential form (POST method) in PHP to lead a user through the process of a complicated, branching calculation. I load the PHP in Firefox 3.6 and it comes up fine, and I do the first submission and that works fine. But if I do another submission quickly (within a few seconds), instead of working, it submits to itself with no fields so I get the front page back again, and no matter what I do, it keeps submitting with no fields. If I then reload the original PHP file not via POST and redo the first submission, the first submission works again and the second fails again. However, if I do the first submission, and then sit there doing absolutely nothing for maybe 20-30 seconds, and then do the second submission, it works perfectly fine. If I again wait, the third submission works; otherwise, it submits like the first with no fields and messes up. I tried this with and without HTTP headers to prevent caching, without effect. Any ideas what's going on? Edit: (And, to be clear, if I change POST method to GET method, it works flawlessly every time. But having the data appear in the URL is confusing and problematic for users, as well as severely complicating the process of bookmarking if the user decides in the middle of the calculation to make a bookmark. The bookmark should be to the beginning of the calculation, not the middle, because the calculation is time-sensitive so old data are useless and should not be re-produced.)

Променено на от jakj

Избрано решение

A good place to ask questions and advice about web development is at the MozillaZine Web Development/Standards Evangelism forum.

The helpers at that forum are more knowledgeable about web development issues. You need to register at the MozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

Прочетете този отговор в контекста 👍 0

Всички отговори (3)

more options

Избрано решение

A good place to ask questions and advice about web development is at the MozillaZine Web Development/Standards Evangelism forum.

The helpers at that forum are more knowledgeable about web development issues. You need to register at the MozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

more options

That's great and all, but as far as I can tell, my issue is not to do with my authoring, but with the browser itself. There is nothing in the HTML specification that would in any way cause a form submission issued X seconds after another to be have differently than one issued Y seconds after another.

(I did, just to try it, add no-store to the Cache-Control, and that still had zero effect on this Firefox issue.)

more options

See also: