Browser refresh/reload

Posted on 2006-06-07
Last Modified: 2010-05-18
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?

Question by:allahabad
    LVL 16

    Accepted Solution

    You can *trick* it to use caching.

    Look at the OSCache from OpenSymphony

    LVL 3

    Assisted Solution

    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.
    LVL 11

    Assisted Solution

    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.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Jquery ajax file upload not working 11 125
    constructor overloading 2 70
    sortaSum challenge java 17 167
    AlarmClock Challenge 35 143
    In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now