• Post Reply Bookmark Topic Watch Topic
  • New Topic
permaculture forums growies critters building homesteading energy monies kitchen purity ungarbage community wilderness fiber arts art permaculture artisans regional education skip experiences global resources cider press projects digital market permies.com pie forums private forums all forums
this forum made possible by our volunteer staff, including ...
master stewards:
  • Nancy Reading
  • Carla Burke
  • John F Dean
  • Timothy Norton
  • r ransom
  • Jay Angler
  • Pearl Sutton
stewards:
  • Devaka Cooray
  • Leigh Tate
  • paul wheaton
master gardeners:
  • Christopher Weeks
gardeners:
  • M Ljin
  • thomas rubino
  • Megan Palmer

double post prevention

 
Posts: 762
Location: Morocco
109
cat forest garden trees solar wood heat woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone with a crappy internet connection has probably experienced this at least once:
You see post, click "reply", write your content and click "post". Then something goes wrong and you press F5 to try again, telling the browser to send your post again, as it obviously didn't work.
However the server still got the request and created a reply the first time… So now your post is duplicated.

My proposed solution is to: [begin technical stuff]
- create a unique ID when "reply" is clicked and stuff it in a hidden form field.
- when a message is posted check if the ID in the form already exists (from the same user?) and ignore the post if so.
- otherwise post the message as usual and store the ID somewhere.
 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
permaculture bootcamp - gardening gardeners; grow the food you eat and build your own home
https://permies.com/wiki/bootcamp
reply
    Bookmark Topic Watch Topic
  • New Topic