Aviod page reload when user hits back button

Hi
I got 2 coldfusion pages A and B. When i click a link from
page A it goes to page B. When i click the back button of the
browser from page B the page A refreshes and shows. I dont want the
page A to reload when the user hits the back button of the browser
(so that all data remains as it was) from page B.
is there any method to cache the page and show? Or are there
any other methods? Pls help. I am running this project in Model
Glue architecture (i dont know whether that makes any difference)

Normal behaviour is that going back does not cause a page to
reload. You might be doing something to make that happen. If you
can figure out what it is, then you can stop doing it.

Similar Messages

  • At selection-screen when user presses back button

    Experts,
    I have two radio buttons and two relative checkboxes ( one checkbox related to other ).
    Now when user selects one radio button and executes teh program, there is a summary page. When user presses back button from there, I return to the selection screen, however the selections are still there.
    Ideally I want a blank screen, as in nothing selected( similar screen when program is executed first ). Is it possible ?
    Kindly advise,
    Gols

    Hi,
    Try clearing radio buttons and check boxes at PBO of selection screen using AT SELECTION-SCREEN OUTPUT statement.
    PARAMETERS:
      p_rad1 TYPE c RADIOBUTTON GROUP rd1,
      p_rad2 TYPE c RADIOBUTTON GROUP rd1.
    PARAMETERS:
      p_chk1 TYPE c AS CHECKBOX,
      p_chk2 TYPE c AS CHECKBOX.
    AT SELECTION-SCREEN OUTPUT.
      CLEAR: p_rad1, p_rad2, p_chk1, p_chk2.
    Hope this helps.
    Regards,
    txhughes

  • Invalidate session when user clicks back button

    I want to invalidate the session when user clicks back button, so that user cannot refresh and reload a page.
    Any suggestions will be highly appreciated.
    Message was edited by:
    sam_amc

    * SessionInvalidator.java
    * Created on October 27, 2006, 9:18 AM
    package web;
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author javious
    * @version
    public class SessionInvalidator extends HttpServlet {
        /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
         * @param request servlet request
         * @param response servlet response
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            String reposted = request.getParameter("reposted");
            if("true".equals(reposted))
                HttpSession session = request.getSession(false);
                if(session == null)
                    // This is step 4 and beyond
                    out.println("<html>");
                    out.println("<head>");
                    out.println("<title>Servlet SessionInvalidator</title>");
                    out.println("</head>");
                    out.println("<body>");
                    out.println("<h1>Servlet SessionInvalidator at " + request.getContextPath () + "</h1>");
                    out.println("I said, your session is now invalid! Now where are those Duke Dollars at?");
                    out.println("</body>");
                    out.println("</html>");
                else
                    Integer hitCount = (Integer)session.getAttribute("hitCount");
                    if(hitCount == null)
                        // This is step 2 (the "good" - "stay" page.)
                        out.println("<html>");
                        out.println("<head>");
                        out.println("<title>Servlet SessionInvalidator</title>");
                        out.println("</head>");
                        out.println("<body>");
                        out.println("<h1>Servlet SessionInvalidator at " + request.getContextPath () + "</h1>");
                        out.println("Your session is good.<br>");
                        out.println("If you click the browser's back button, you will invalidate your session.");
                        out.println("</body>");
                        out.println("</html>");
                        hitCount = 1;
                        session.setAttribute("hitCount", hitCount);
                    else
                        //We've used up our good visit
                        session.invalidate();
                        // This is step 3
                        out.println("<html>");
                        out.println("<head>");
                        out.println("<title>Servlet SessionInvalidator</title>");
                        out.println("</head>");
                        out.println("<body>");
                        out.println("<h1>Servlet SessionInvalidator at " + request.getContextPath () + "</h1>");
                        out.println("Your session is now invalid");
                        out.println("</body>");
                        out.println("</html>");
            else
                // because the javascript in the following output will never allow a user
                // to continue clicking back any further than this, we can safely create the session.
                // (or perhaps the session can already be created here and this may not be necessary).
                // A problem lies where if the user chooses to "select" a page back in history they thereby
                // potentially skip back "over" this functionality, thus defeating the purpose of it.
                request.getSession(true);
                // This is step 1 (indirection)
                out.println("<html>");
                out.println("<head>");
                out.println("<title>Servlet SessionInvalidator</title>");
                out.println("</head>");
                out.println("<body onload=\"document.getElementById('invalidatorForm').submit()\">");
                out.println("<h1>Servlet SessionInvalidator at " + request.getContextPath () + "</h1>");
                out.println("<form id=\"invalidatorForm\" action=\"SessionInvalidator\" method=\"POST\">");
                out.println("<input type=\"hidden\" name=\"reposted\" value=\"true\">");
                out.println("</form>");
                out.println("</body>");
                out.println("</html>");
            out.close();
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        /** Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Returns a short description of the servlet.
        public String getServletInfo() {
            return "Short description";
        // </editor-fold>
    }The problem with even attempting to do this is that with today's browser capabilities, users can optionally choose to jump to a particular page in the browser history and this may not necessarily be the most recent page. In this case, you would also want to invalidate the user's session after already having been there (whatever page that may be). Then you have situations when the user may wish to jump back in history to external pages they were visiting before they reached your own site's pages. Then what happens when they start clicking forward, forward, etc... from there? This is why I prefer writing Swing Clients as alternatives to browser applications. There are soo many possible ways break web applications made for standard web browsers both maliciously and simply by accident or irregular user patterns. Regardless, this servlet would work based on the assumption that all the user(s) would "ever" do aside from moving logically forward is clicking on the browser's "back" button.
    cheers!
    Message was edited by:
    javious

  • Hello, i have one issue when i hit back button of F Fox than it will show me " Document Expired " alert message.. i need to avoid this alert.

    Hello, i have one issue when i hit back button of F Fox than it will show me " Document Expired " alert message.. i need to avoid this alert.
    because my site is based on ajax so i need same page with my all activity i perform before i go next page when i hit back button..
    Please give me solutions of this problem if possible.
    Thank you

    Are you sending HTTP response headers that instruct Firefox not to cache the pages?
    You can get a "document expired" message if you use the back button to return to a specific page and the web site has instructed Firefox not to cache the page.<br />
    Firefox tries to retrieve the page from the server, possibly by sending POST data.

  • How to make the page expired when user click back

    how to make the page as expired when i click back button on the browser.
    i want a better way.
    actually i have a timer.when it reaches 00.00 then the expired page will be called automaticlly using location.href="expired.jsp" then if the user clicks back it should not show the previous page.this concept is applied with paging concept
    response.setheader is not working ...
    i have redirect when click back using
    <body onunload>....i call another page here.
    but it is not a good way.
    so pls help me to solve this problem
    using session or another good way

    Use this instead.
    Frame.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);

  • Triggering POPUP to SAVE when user Presses BACK  Button

    h4.
    Hi Friends,
    h4.
    When the User Presses BACK Button in the PF Status, it should trigger POPUP_TO_CONFIRM  whether to SAVE or not.
    h4.
    Suppose if the user doesn't change any thing in the Screen, it should not ask the User.
    h4.
    How can i know whether the user changes something in the Screen.
    h4.
    Screen mean Table Control..
    h4.
    How can i track this.
    h4.
    Regards:.
    h4.
    Sridhar.J

    Hi Sridhar,
    Within the table control loop, create a chain of all the fields in the structure of line type. call a PAI module with addition ON CHAIN-REQUEST. This is a conditional module call which will be triggered ONLY when user changes something on the screen. In this module you can set a global variable DATA_CHANGED to say 'X'. When user chooses BACK function, check this global variable to decide on the confirmation popup.
    One small caution. If you have the ROW SELECTION field also included in the line type of your internal table associated with the table control, you need to exclude that from the CHAIN of fields above; otherwise even when user selects a line or de-selects, this module will be triggered.
    Read ON CHAIN-REQUEST and ON REQUEST online ABAP help for more clarity.
    Regards
    Suresh
    Edited by: Suresh Radhakrishnan on Sep 28, 2009 4:29 PM

  • Authenticate when user clicks back button after logging out

    Hi All,
    Is there a way that the user can be forced to authenticate, if he has just logged out, and then clicks the back button.
    I have a situation where a user who is working on relatively sensitive data logs out (yeees they should close the browser and all, but they never obey instructions... ) and someone else can come around and click the back button, and see what what he had been working on.
    Is there a way to disable this behaviour, or otherwise force a reload/re-authentication.
    Thanks.

    Hi there,
    You can accomplish this by writing this code in each page of your application
    Write this in your html header:
    <script type="text/javascript">
    javascript:history.go(1);
    </script>and write this in Page HTML Body Attribute:
    onunload="javascript:history.go(1)";It will not allow your users to go back.
    Thanks
    Tauceef

  • Old topic: Refresh when user click back button

    Yes yes, i know, this is old topic, which already discussed thoroughly in the forum,
    But, pls read my question....
    i try this:
    res.setHeader("Cache-Control", "no-cache");
    res.setHeader("Pragma", "no-cache");
    res.setDateHeader("max-age",0);
    res.setDateHeader("Expires",0);
    res.addHeader("Cache-Control", "no-store");
    However, when i forward to a page, then click back button to the previous page, which have the code above, however, the page is still the old one, the page was not reloaded from server
    Any suggestion? 1:57 am, my local time.......

    I just use:
    response.setHeader("Pragma","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.setDateHeader("Expires",0);I have tried this, still the same...what can i do? Any more workable solution?

  • How can I disable Firefox asking me to confirm a resend when I hit BACK button?

    When I hit the back key after doing a search and clicking on a result, Firefox usually, but not always, asks me to confirm resending before taking me back. This is very annoying. I can't find any option to disable this.
    Is there some way to disable this, or can I suggest it as an enhancement? When I click on BACK, I just want it to go back without prompting me to confirm it.

    '''In url:'''
    about:config
    '''find:'''
    browser.sessionstore.postdata
    '''change:'''
    0 to 1
    Got this from a buddy, been working fine so far.
    OS: Ubuntu 10.04
    Browser: FF 3.6.18

  • After doing a Google search, I click on a link and go to the searched web page.  When I go back to the Google page using the back button the links I originally clicked on no longer show as "greyed out".  Any idea what is going on with the browser?

    After doing a Google search, I click on a link and go to the searched web page.  When I go back to the Google page using the back button the links I originally clicked on no longer show as "greyed out".  Any idea what is going on with the browser?

    Type '''about:config''' in the Location (address) bar and press the "Enter" key. When you see a warning, click '''I'll be careful, I promise!''' button.
    * Preferences that have been modified are shown as '''bold (user set)'''.
    * Preferences can be '''Reset to the default''' or changed via the right-click context menu.
    -> In the '''Filter bar''', type '''browser.sessionhistory.max_entries'''
    * Right click the preference '''browser.sessionhistory.max_entries''' and click '''Modify'''
    * Change value from 0 to whatever you want over 0 (Default value is 50)
    * click OK
    -> Close the '''about:config''' tab and then Restart Firefox.
    See this post:
    * https://support.mozilla.com/en-US/questions/860894#answer-229574
    Check and tell if its working.

  • Why does Safari refresh the page when using the back button?

    Safari didn't use to do this.
    Even on these forums, when you hit the back button to go back exactly where you were at, if there are new posts, the entire page may have changed. I knew exactly the next post I wanted to look at before the page was refreshed. Now, I can't even find the post I wanted to read unless I scroll through the entire list again.
    I need to be able to go back to the page I was just on and not have it refresh.
    I need to go back exactly where I was.
    Safari can't even go back properly as it wants to go back near the top of the last page I was on.
    I need it to go back exactly where I was at.
    I have no idea what the engineers are thinking about this one.
    FireFox works properly when going back to the prior page.
    I have long lists on pages I work with.
    For example:
    1. through 1,000.
    If I am on reference number 500 on the previous page, when I hit back, it goes all the way back up to around 20 in the list.
    I have to then scroll manually page down to 500 where I was at.
    This is tedious, cumbersome and unnessesary.
    Safari was much better before it was updated to this horrible behavior.
    I don't know of any preferences you can change to change this odd behavior.
    Anyone know of anyway to stop this horrible behavior in Safari?
    This is like reading a book, but when you go back a page, the entire page may have changed and I have no idea where I was at.
    Pretty $iss poor in my opinion.

    Yes, that is correct.
    However, you can also use the mouse or trackpad to swipe back a page and it still refreshes the last page.
    Safari never did this back in Snow Leopard and maybe some versions of Safari in Lion.
    However, Safari in Mountain Lion always does this.
    It is very cumbersome using the "open link in new window" or "open link in new tab".
    It was much better just being able to click the back button or swiping to get back exactly where you were on the prior page.
    Hopefully more people will send Apple feedback on this.
    Thanks for sharing.

  • Keep getting "Document Expired" when hitting back button! Very annoying

    Document Expired when hitting back button! Very annoying This has been ongoing intermittently for years Why cant this be fixed? Is anything being done about it?

    Locking since you have a duplicate thread at [https://support.mozilla.org/en-US/questions/922734 https://support.mozilla.org/en-US/questions/922734] .

  • Need to generate XML report  (when user clicks the button)from Application Express 4.0.0.00.46

    I am new to Apex so I invoke all the APEX GURUS to help me !!!
    Here are details.
    When the user hits a button from APEX page he can download an XML report
    here is the parameterized SQL query:

    Duplicate thread: https://community.oracle.com/message/11325665

  • How to Do Validations When Approval Hits Reject Button?

    The transaction has been initiated and now it routes to the next approval.  The approval opens up the work item and it brings the form with the details transaction initiated.  The approval hit "Reject" button to reject the transaction.
    Is there a way / BADI that I can put a validations so that it'll throw a message whenever user hit "Reject" button?

    Hi Shreya,
    I saw that this question has been marked answered.
    Do you mind to share the solution as I am also having the same problem here.
    What i need to do is to add validation when approvers hit on Approve button or Back to Author button.
    The validation will be checking whether comment is entered, error msg will be prompted if no comment entered.
    Please advice.
    Thanks
    Regards,
    Justin

  • When I click "back" button selection screen is not appearing

    Dear All,
    1) I have a "report" which takes some parameteres in the seclection screen ( standard 1000 ) and displayes a report. This is transported. Say the name is ZPRG1
    2) We have copied ZPRG1 to ZPRG_temp and modified some logic and copied back to ZPRG1.
    3) All looks fine but in ZPRG1 in SE80 it is not displaying screen "1000" listed. And when I pressed "back" button from the standard report menu it is going into "blank" screen first. and then when i click again it comes to the selection screen. I understand that some thing happened with GUI stuff but ran out of all ideas and coming here to get some help from you..
    I am almost in a lost state.. can you please suggest me?
    Thanks for your time.
    Regards,
    Kiran

    Hi zhenglin gu,
    Finally I found the reason.. still not conviced.. but the issue is happening when I write block with in the block. I am not convinced but it is true here..
    Issue code******** ( Block with in block )
    SELECTION-SCREEN BEGIN OF BLOCK CHECK1 WITH FRAME TITLE ext-t01.
    *skip 1.
    SELECTION-SCREEN BEGIN OF BLOCK CHECK2 WITH FRAME TITLE text-t00.
    select-options: s_system for /BIC/AZSEUST0400-/BIC/ZSYSIDNT
                    no-extension no intervals .
    parameters:   P_USER   type /BIC/OIZSECUNAME OBLIGATORY.
    select-options: S_PROF for zsecurity-value_1 no intervals.
    SELECTION-SCREEN PUSHBUTTON 60(20) BUT1 USER-COMMAND PROF
                                VISIBLE LENGTH 25.
    SELECTION-SCREEN END OF BLOCK CHECK2.
    PARAMETERS: P_AB RADIOBUTTON GROUP gr1,
                P_CON RADIOBUTTON GROUP gr1.
    SELECTION-SCREEN END OF BLOCK CHECK1.
    Issue ********
    No Issue ******** ( Outer block is comented)
    *SELECTION-SCREEN BEGIN OF BLOCK CHECK1 WITH FRAME TITLE text-t01.
    *skip 1.
    SELECTION-SCREEN BEGIN OF BLOCK CHECK2 WITH FRAME TITLE text-t00.
    select-options: s_system for /BIC/AZSEUST0400-/BIC/ZSYSIDNT
                    no-extension no intervals .
    parameters:   P_USER   type /BIC/OIZSECUNAME OBLIGATORY.
    select-options: S_PROF for zsecurity-value_1 no intervals.
    SELECTION-SCREEN PUSHBUTTON 60(20) BUT1 USER-COMMAND PROF
                                VISIBLE LENGTH 25.
    SELECTION-SCREEN END OF BLOCK CHECK2.
    PARAMETERS: P_AB RADIOBUTTON GROUP gr1,
                P_CON RADIOBUTTON GROUP gr1.
    *SELECTION-SCREEN END OF BLOCK CHECK1.
    End of Block2.
    No Issue ********
    I think I used several blocks with in blocks.. but I do not know why it is hapening.. in my case, i am fine with eliminating the outer block.. so removed and transporting it...
    Message was edited by: Hari Kiran

Maybe you are looking for

  • Vendor Line Items

    Is there any std BAPI or FM to get Vendor Line Items? Is there any database Table which shows all  Vendor line items (open and cleared)? Note : table BSIK shows only open line items. Thanks in advance. Points will be rewarded.

  • Inbound idoc error message

    Hello support team, I am developing a report in which i have to give a select option "date" when i entered the date in this select-option then after executing , the corresponding idoc type, idoc date, idoc number , idoc receiving site and idoc messag

  • Excel addin error

    Hi, I am using EPM 11.1.2.2 and I have office 2010 and excel addins 11.1.2.2. While retrieving I am getting the below error. I tried the solution provided in the link "http://oraclebrasil.wordpress.com/2011/11/09/error-essbase-has-encountered-an-inte

  • 3D functions don't work anymore in a single project

    Hey there, I'm having a problem with the 3D functions in my recent project. (note: only in this particular project!) When putting the 3D tick on any layer, all the other layers in the composition just turn invisible and the background is set to black

  • What Driver for Agilent 2000-X Series Win NT / Labview 6

    Need to Integrate a 2000-X series into an old AT system. Win NT Labview 6.0 Could use help getting started - not sure if this setup will work or what drivers will be compatible with this system?