• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

Browser refresh/reload

I have a report  displayed by selecting records from a database. When user click on refresh/reload, I don't want server to re-select the data again.

Is there anyway to know at the server that user has clicked on refresh/reload button?



Thanks,
0
allahabad
Asked:
allahabad
3 Solutions
 
suprapto45Commented:
You can *trick* it to use caching.

Look at the OSCache from OpenSymphony
http://www.opensymphony.com/oscache/

David
0
 
runa_paathakCommented:
Have a hidden field in your form, submit the form thorugh a javascript function after setting some value for the hidden field. The trick here is that the javascript will be executed only when the user clicks on your submit button and not when the page is refreshed using refresh button. So, on the server side if the hidden field's value is not set, you know that the user refreshed the page.
0
 
IsisagateCommented:
I've been storing my results in session if I already retreived it.  This works best if the data does not get refreashed that often.  Otherwise you can set a 30 - ?? second timeout to restore the data.  

I hope this helps.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now