views:

96

answers:

0

Recently we've found one very strange bug in our application.

There is a form for paid message sending. User selects his contact members, groups, enter phone numbers and text message, after that he click on Submit button and we send an AJAX request to validate the form and required account's balance for the operation.

If user had selected big group for sending(3K+ members) than it takes some time to finish cost validation for the whole sending plan and hide "Loading" block/display sent messages plan page.

User sometimes doesn't wait until the end and clicks on F5/ctrl+F5/Refresh in his browser and then for some reason AJAX request duplicates, so we save one redundant copy of the same plan.

This bug can be reliably reproduced in FireFox 3.0.10 browser with F5 button click.

Can you please explain why this happens? I thought until that moment that simple AJAX requests haven't be resent by "F5" click..

And how those duplicated requests can be blocked?