• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Idempotent matters

 
Rudy Harianto
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

HFS state that we must solve IDEMPOTENT problem programmatically. My question is: HOW?
Suppose that we have a page that saves something to database. But during the process, user clicks the refresh button on the web browser. So there�s 2 same request sent to server. How can we know that the second request should not be process?
Is adding flag parameter to request working in this situation?

Thanks.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rudy,

As per the HTTP specificatin some methods are idempotent, but while using these methods, there is no difference. Setting a flag or hidden form field is one of the way to slove this problem.

Using the HTTP POST method, some browser display a message about reposting of data when Refresh button is pressed. But this is not gaurateed.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic