Back Button after logout

After the user logs out, and if they click the back button again they should see
some error message, or be redirected to the error page. I have put the following
in the head.jsp but it does not work.
I tried using both the blocks (one at a time) in head.jsp - but neither worked.
<%
response.setHeader("Expires", "Mon, 26 Jul 1990 05:00:00 GMT");
response.setHeader("Cache-Control" ,"no-cache, must-revalidate");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control","no-store");
%>
OR
<meta http-equiv="expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">

Leonardo -
When you click back the portal framework does not execute the page flows again.
Thus this solution will not work.
Thanks
Kunal
"Leonardo Contreras" <[email protected]> wrote:
>
You can use the login-required annotattion for catching LoginExpiredException
and
NotLoggedException, this could fix your problem (i´ve used it with pageflows,
i don´t know if there is some equivalent in JSP), a very usefull example
of login
page is used with Avitek Portal example (I supose you talk about Portal
8.1).
"Kunal Mittal" <[email protected]> wrote:
After the user logs out, and if they click the back button again they
should see
some error message, or be redirected to the error page. I have put the
following
in the head.jsp but it does not work.
I tried using both the blocks (one at a time) in head.jsp - but neither
worked.
<%
response.setHeader("Expires", "Mon, 26 Jul 1990 05:00:00 GMT");
response.setHeader("Cache-Control" ,"no-cache, must-revalidate");
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control","no-store");
%>
OR
<meta http-equiv="expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">

Similar Messages

  • How to disable  browser back button after session logout..

    Hi;
    I want to restrict the user to use the back button after session expired or logout. By doing the session expired we are restricting the user to do any new work but I want to restrict the user to see the back pages that he surfed previously in the session.
    Is there any method to disable the browser back button after the session Expired?
    please help me to find out the solution..
    Thanks in advance.
    With Regards,
    Haramohan

    One possible way is automatic return to the current page by writing the following Javascript code to the previous page:
    <script language=JavaScript>
    function backButtonOverride(){
    setTimeout("backButtonOverrideBody()", 1);
    function backButtonOverrideBody(){
    try {
    history.forward();
    } catch (e) {}
    setTimeout("backButtonOverrideBody()", 100);
    </script>
    <%
    catch(Exception e){
    %>
    <jsp:forward page="front.jsp"></jsp:forward>
    <%
    %>

  • Using Back Button after Display Report

    Hi,
    Need an advice, i need to customize the standard BACK button after report had been displayed, trying to use AT USER-COMMAND, but still not avail..
    anyone can come with example will help me a lot.
    Thanks

    Hi badz lee,
    Just change the function code 'BACK' to 'ZBACK' in your custom GUI staus.
    Then write your own logic for the custmer needs.
    Hope this code helps.
    *& Report  ZVK_TEST
    REPORT  zvk_test.
    TABLES:ekko."for select option only
    SELECT-OPTIONS:s_ebeln FOR ekko-ebeln.
    DATA:lt_ekko TYPE TABLE OF ekko,
         lw_ekko TYPE ekko.
    START-OF-SELECTION.
      SET PF-STATUS 'STLI'."copy status STLI of program SAPMSSY0.
      SET TITLEBAR 'TITLE'.
      SELECT * INTO TABLE lt_ekko
        FROM ekko
        WHERE ebeln IN s_ebeln.
      LOOP AT lt_ekko INTO lw_ekko.
        WRITE:/ lw_ekko-ebeln,
                lw_ekko-bukrs,
                lw_ekko-bstyp,
                lw_ekko-bsart.
      ENDLOOP.
    END-OF-SELECTION.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'ZBACK'.
          PERFORM back_function."Your logic
        WHEN OTHERS.
      ENDCASE.
    *&      Form  BACK_FUNCTION
    FORM back_function .
      LEAVE PROGRAM.
    ENDFORM.                    " BACK_FUNCTION

  • Stop user from cliking back button after logging out

    How can I stop the user from clicking the back when they had clicked the log out link...?
    <%@ page language="java" %>
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body>
    </body>
    <script language="JavaScript" type="text/JavaScript">
    function refreshIt() {
    setTimeout('window.parent.location.reload()', 7 * 1000);
    <%
    session.removeAttribute("username");
    session.invalidate();
    response.sendRedirect( response.encodeRedirectUrl("index.jsp?message=You had logged out from the system"));
    %>
    document.onload = refreshIt();
    </script>
    </html>

    You can NOT stop the user from clicking the "back" button.
    However, all is not lost.
    Since you're invalidating the session, simply have every page that requires the user to be logged in check for a valid session before proceeding. Put that code into an "include" file. If the session is invalidated, redirect the user back to the "Please Login" page. Do this IMMEDIATELY before doing ANYTHING.
    Another technique, but is essentially the same thing, is to "logout" to a page with javascript that redirects the user to the "You are Now Logged Out" page, with either a "redirect" or a "window.forward()" call. When the user clicks "back", they'll return to the page with the javascript that redirects the user to the "You are Now Logged Out" page. The only problem with that is that savvy users using IE can click the "history" portion of the "back" button, and go back 2, 3, 4, etc. pages if they want to.
    Therefore, you'll still have to write the code at the beginning of every page that kicks the user back to "Please Login" if the session was invalidated.

  • I lose the back button after a time (about 45mins). Any help?

    I lose my back button (upper left on tool bar) after about 45 minutes on line
    == This happened ==
    Every time Firefox opened
    == several months ago

    I was referring to the search box in Google's page. I also use the search box to the right of the address box up on the navigation toolbar. I never search from the address area itself. Is that where it is getting blanked out?
    It's probably not a problem with Windows. More likely you have an add-on that is causing the problem. You can restart in Firefox's Safe Mode to test that theory.
    First, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)
    Next, this article describes how to start in Safe Mode from various versions of Firefox:
    [https://support.mozilla.com/kb/Safe+Mode Safe Mode].
    If that works as expected/intended/designed, then one of your add-ons likely is the problem.

  • No back button after opeing new tab from link

    If I’m viewing a site like Craigslist and click on a new link, it opens that link on the same page and all is well. If I do a Google search and click on a link from that page, a NEW TAB opens to view that page. However, the back button is gray and won’t let me use it. I have to close the new tab in order to get back to my original search page.
    I’ve read many posts on this for the last TWO HOURS and finally gave up. I don’t believe I have Mcafee or site advisor so I don’t think that’s the problem. But obviously I’m not smart enough to figure this out so maybe I do have it. ARG
    Any suggestions would be welcome!
    Thank you

    Each tab has its own history, there is no way to "go back" in a "new tab" to the history of the "parent tab".
    Google specifically has its own user setting for whether a hyperlink opens in the same tab or a new tab. I suspect that if you clear your Google cookies in Firefox that will change your Google prefs saved in that cookie to opening hyperlinks in the same tab.

  • 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

  • Browser Back Button after Leaving Flash

    Hello -
    I am currently working on a site where a button in the flash takes you to an external link.   The user would like the browser back button, when you are on the external link, to take them to the page on the flash that was last viewed without restarting the flash.  Is this possible?  Thank you!

    Thank you very much!
    Heather R. DePriest
    Montana Grafix - Web & Graphic Design Services
    PO Box 817
    Chinook, MT 59523
    (406) 357-2394
    www.montanagrafix.com
    Email: [email protected]
    This message and its attachments may contain confidential and/or privileged material and is intended only for the person or entity to which it is addressed.  Any review, transmission, dissemination, or use of, or any action taken in reliance on, the material in this message is prohibited and covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521.   If you received this message in error, please contact the sender immediately and promptly delete the message from your system.

  • Lost the forward/back button after updating and the home button how do I get back?

    Firefox updated to 7 and I lost all of my add ons including the home button and the forward/back button. I was able to get all of my add ons restored except the home button and the forward/back buttons. How do I get them back? Wish now that I had not updated.

    Make sure that you do not run Firefox in Full Screen mode with all toolbars hidden.
    * Press F11 to toggle full screen mode (Firefox/File > Full Screen)
    If the menu bar is hidden then press the F10 key or hold down the Alt key, that should make the menu bar appear.
    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible: "View > Toolbars"
    * If items are missing then open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout" (Linux, Windows)
    * If a missing item is in the toolbar palette then drag it back from the Customize window on the toolbar
    * If you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar set up.
    See also:
    * http://kb.mozillazine.org/Toolbar_customization
    * https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • Back button does not work with some web sites to return me back too Firefox main page after concluding business on site.

    After connecting to a web site and completing tasks, I use back button too return too Firefox main page. After using back button to get back to the original site log in page the back button (after repeated uses) will never get me off the web page and back to the Firefox main page. At this point the only way too get back too Firefox main page is too shut down Firefox wait 60 seconds and restart Mozilla-Firefox.

    Some web pages are coded to redirect you forward to another page. In that case, when you go back to the page, Firefox redirects you forward again.
    To bypass this, use the history drop-down next to the back and forward buttons. The drop-down has the most recent pages on top, and older pages below. Jump as far down the list as you can, then repeat as needed to get back to the first page.
    Does it work?

  • Problem in how to stop displaying previous page after Logout

    <%
    // I invalidate all my session when i logout and comes on Login.jsp page but if i go back still it open
    previous pages
    How i can stop these
    i am adding these line in avery jsp page
    1)
    response.setHeader("pragma","no-cache");
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.addDateHeader("Expires", 0);
    response.setDateHeader("max-age", 0);
    response.setIntHeader ("Expires", -1); //prevents caching at the proxy server
    response.addHeader("cache-Control", "private"); //IE5.x only;
    %>
    2) and in Logout.jsp
    response.sendRedirect("Login.jsp");
    session.invalidate();
    session.removeAttribute("viv");
    still on reaching login page i can move to previous page by clicking back button

    Hi sreenathreddy.
    I am doing exactly what you are talking about.
    On load of each jsp page, I check to see if I am still in session. If i am not, i redirect the user to the login page saying his session has expired.. This works perfectly fine in the sense that after I log out, if I directly type in the url or click on any other link from history, it redirects you to the login page.
    But my problem sitll remained that after logging out, if i clicked the back button, it would still take me to the previous page even though none of the links on that page would work.
    So i added all the response.SetHeaders that are mentioned in this discussion.
    Now the scenario is such that, when i press the back button after logging out, it tells me that the page has expired and i have to resubmit the form.
    There are two problems with this
    1. at this point , if i refresh my page, it still gets the details from the server and even though i am invalidating the session and all the user details, and checking to see if the session is invalidated,it still somehow manages to get all the details(i dont know where that info is stored)
    2. even if the person has not logged out. ie in the middle of a perfectly valid session and clicks on the back button, he is warned that the session has expired.
    please do reply
    thanks
    ritesh

  • I filled in a PDF form. When finished, I could not find how to save the completed form. So I took a chance and used the phone's back button. A message popped up saying the form was saved and to go to the cloud to view it. What cloud?

    I tried all I could think of but found nothing. In addition, I checked the phone's memory and found the file with a created date/time only about 15 minutes old. When I opened it, I was at first relieved. The portion showing on the screen was filled in. Then I looked at the other 3 and ¾ pages. All fill spaces are empty! What's up with that? And where do I find the finished form in that illusive cloud?

    Form document will automatically be saved after closing the file. As far as cloud message is concerned, it seems your Mobile link setting has been turned on. When you pressed device back button after filling the form, it was saved to your Acrobat.com account. You can access this document by going to Acrobat.com tab present in left pane. Its a cloud storage area where you can upload/save any document.
    Thanks,
    Adobe Reader Team

  • Problem with the back button in the Alv ouput

    i have  refresh button in output of my alv report when i click on this it is getting refreshed ,now the problem is with the back button after refresh whn i click on back button it is not going to selection screen , i have to  click  the back button thrice  to come out to the selection screen ,if have refreshed  the ouput  screen twice .
    if i dont refresh the back button is working fine , So i have used "call to selection screen 1000" it coming  to selection screen without any problem  but in selection screen on clicking on back button it is again going back to output screen ,So please suggest what has to be done here .

    Hi Brahmananda,
    Please try to understand the flow of program and the screen navigation
    the click of BACK button triggers PAI and (to the best of my knowledge) you might have called the ALV screen number without any checks ( may be) so it is again taking to the ALV.
    try using
    in PAI
    module exit at exit-command
    in program
    module exit
    case ok_code
    when 'BACK'.
    LEAVE PROGRAM ( or any thing that you want it to be )
    endcase
    endmodule
    regards
    Ramchander rao.K

  • Sometimes the url's don't update so when you press the "back button" it sends you to the home page instead of the last page visited

    A friend of mine has this webblog and I have never had problems viewing it before I downloaded the new version of firefox. However, once I downloaded the new version, I noticed that every time I press the "back button" after viewing a picture, it sends me back to the blog home page instead of the last page I was on or that I viewed. This also happens with some of the standard websites I visit not just the blogs.

    Right click the Back button and select the page you want to go back to.

  • Reload previous page on back button - using cache control

    Hi,
    In my application I am using cache control to avoid the pages to be cached. But the requirement is changed and now the previous page can be re-loaded on hittinh browser's back button even after the 10 mins. i.e if user hits the back button with in 10 mins he should be allowed to see the pre-loaded contents on the previous page. After 10 mins the browser should display the page refresh warning.
    a) Old code to preventing caching:
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0     
    response.setDateHeader ("Expires", -1); //prevents caching at the proxy server
    b) I am trying with the code ha changes as to get the previous page with in 10 minutes time:
    response.setHeader("Cache-Control","no-cache, max-age=600"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0     
    The above code changes are not working. If uses "no-cache" with max-arg=600 it behaves like the code in section a).
    If I uses response.setHeader("Cache-Control","max-age=600"); then even after 30 mins it load the previous page with preloaded contents.
    Any help is appreciated.

    I tried it lots of time by refreshing the browser's cache. I am using IE 6.0. I tested it through FireFox to get the header details. when I submit the request it displays the headers request
    same as I set in the code. But when I hit the back button (after the max age time passed) still it gets the value from cache and no header values are displayed.

Maybe you are looking for

  • HELP - URGENT - N8 no respone at all !!!

    My N8 no respone at all after I launch default camera app, the screen hang by showing camera icon at the middle. N8 no respone at all, even press menu button, or long press the on/off button on the top. Before this happens, my N8 opening dfault faceb

  • Can't access jpeg files through finder after import to iPhoto '11

    Am I missing something here? I recently imported my entire library from a backup source to iPhoto '11 on a new computer. I used to be able to browse the folders in the iPhoto library in a finder window. Now when I try to open the iPhoto library, the

  • How to retrieve data from MS Access

    anybody no how i can get data out of a ms access database and put on a web page? sample code very helpful...

  • What and where is AVFoundation?

    Hi, Does anyone know any thing about Osiris 8.2? I am trying to run it on a 17" iMac. It cannot be opened because of a Problem. "Library not loaded: / System/library/Frameworks/AVfoundation/ etc, etc, Has anyone seen this problem before?

  • IPhone4 with Win7 OS - Can you config the photo stream directory?

    Hi Group- I'm on an iPhone4 iOS5 with Win7. I am pulling my hair out and have been ever since I purchased the phone on how to manage my photos? The Albums feature does not seem to help either. I have several questions about Photos but I'll limit to m