Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between request and refresh

 
Mahajan Bhupendra
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends..
I m having a very small problem..
how do i distinguish between a request(i.e get of post)
and refresh(i.e. user has clicked 'refresh button on
browser)..
because when i m refreshing it is executing request method...
can anybody help...
Bhupendra
[This message has been edited by Mahajan Bhupendra (edited March 05, 2001).]
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't directly distinguish between them, really. What you can do is examine the request and see if it makes sense given the session state. Or compare it to the last request; if it's identical it must be a refresh (but that's rather weak given that the user can go several pages back in the history and then press refresh).
You're not the only one to struggle with this problem. I've seen e-commerce sites warn users that placing an order may take some time and "please don't press refresh as you may be placing a duplicate order". In my book, this indicates a design fault. One way to fix it would be to ensure that each shopping cart has a unique identity and allow only one order to be placed for any given shopping cart.
This is just an illustration of the ways you can deal with refreshes. Which method you should choose depends on the system you're trying to build.
- Peter

[This message has been edited by Peter den Haan (edited March 05, 2001).]
 
Mahajan Bhupendra
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help
bhupendra
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mahajan Bhupendra:
please

Happy to, if you indicate in what way my response didn't answer your question... yes, I know it wasn't entirely what you wanted to hear
- Peter

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic