Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Μάθετε περισσότερα

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: