Persisting a session even when the browser is closed

i want to persist a user session even when the browser is closed. How to do it through cookies. I know i define a cookie, set its max age and then put that in response. But its not working.
I am using I.E

i am not sure if i am doing something wrong. the cookies are enabled and i see that for ie 7, if i open a new tab the session is maintained but if i open a new window (of I.E. 7) altogether then the session is not maintained. Interestingly the code is working in firefox. is there some problem with the I.E. only?

Similar Messages

  • Destroy the session automatically when the browser is closed by user

    Is it possible to automatically destroy a session when the browser is closed by the user with the X?
    Basically, what we want to do is to create the same effect when the user is closing the browser (with the X button) as when the ordinary log out button is used. That is to have the session destroyed.
    Any ideas?
    /Carl-Johan

    Hope this helps...
    Refer note : 904155
    from SAP Note 904155----
    Symptom
    A BSP application is not terminated correctly when the user closes the browser window or navigates to other URL.
    The popup window, which appears on browse closure, contains the
    text representing <img> HTML element content in the escaped
    form, like that:
    <IMG WIDTH=quot; HEIGHT=quot; SRC="...
    After the popup disappears, the session remains opened.
    Since the session is not removed, that may result in database locks that still remain and can be found in transaction SM12.
    Other terms
    Business Server Pages, WebAS, sessionexit, session termination, SM12, SM04, SYSTEM, session_single_frame.htm
    Reason and Prerequisites
    Reason:
    The problem is caused by the minor code inconsistency in BSP application SYSTEM -> page SESSIONEXIT.HTM.
    Prerequisites:
    1. The application is using the SYSTEM application page SESSIONEXIT.HTM for logoff. When it runs, suddenly HTML source code appears on the logoff screen.
    2. SAP_BASIS 620 SP57 or SAP_BASIS 640 SP15 or SAP_BASIS 700 SP06 are installed.
    Solution
    Please install SAP_BASIS 620 SP58 or SAP_BASIS 640 SP16 or SAP_BASIS 700 SP07
    or
    apply the code correction as described below:
    1. Go to BSP Application SYSTEM.
    2. Select page SESSIONEXIT.HTM and turn on Change mode.
    3. Change the line:
    <%=application->session_exit( exit_url = app-exit_url namespace = app-appl_ns name = app-appl_name page = app-page_name )%>
    to:
    <%raw=application->session_exit( exit_url = app-exit_url namespace = app-appl_ns name = app-appl_name page = app-page_name )%>
    Arun
    P.S Assigning points is a way of saying thank you on SDN
    Message was edited by: Arun Varadarajan

  • How to invalidate a session explicitly when a browser is closed

    hi,
    i am keeping the information of a logged user when he logs succesfully in a session. the session time is maintained for half an hour.
    i am also storing his information in an application object.
    when a user logs out i am invalidating the session and his information is removed from the application object .
    when a person is logged and another person at other place stries to log in with the same username and password, i am making use of this application object to check whether the anyone is looged in with that user id or not. if the id aleady exists in the application object i will not allow the second person to log in and i will provide with a relavent mesasge " already logged in with this ID".
    But the problem is arising when a person loogs in and closes the browser (wth out looging in).
    in this case the session is not invalidated and his information remains in the session and application object.
    when he tries to loog in immediatly after closing the browser, the same checking is done for the duplicate log in and a message is displayed to him saying that " already logged in with this ID".
    he has to wait till the session expires (i,e till 30 min) and then log in
    As this creates problem, i want to invalidate the session the time when the browser is closed.
    i tried with the onUnLoad() methos in javascript, but that method is not only called when closing the browser but also when a link is clicked ot when refreshed the page.
    i am trying with Cookies but i am not gettin ga good approach as how to go forward with this problem.
    Any body who can solve this please....reply soon or mail me
    Its very Urgent................
    Thanks
    sowjanya

    2.Any business critical web site should not allow
    multiple users to
    work under same account at same time.Not true. My customer's web site is "business critical" and they explicitly wanted to be able to login multiple times with the same ID. At least in this scenario we completely circumvent your problem.
    The Javascript solution will never be 100%. What happens if their internet connection drops and doesn't come back? Suppose their OS crashes? What if their power goes out? What if IE crashes? What if JS is turned off? What if the user just walks away and leaves the browser open forever?
    You may be trying to get too much control, which on the web always leads to failure. Maybe a better alternative would be to warn the user that is logging in the second time that there is an outstanding login and that the previous user will be logged out if he proceeds. Then, keep a record of the event in case someone is messing with other accounts (although, since he obviously knows the username and password it is probably a user concern.)

  • How to logout an user when the browser is closed?

    Hi,
    does someone knows how to logout an user when the browser is closed?
    Thanks.

    Hi,
    There is an api wwctx_sso.cleanup_sessions which removes old sessions. This takes a parameter "p_hours_old" which indicates the age of the sessions which need to be removed. There is a job which runs which in turn calls this api to clean up sessions which are 7 days old or 168 hours old. You can see this from the dba_jobs table. You can try running this api.
    Thanks,
    Sharmila

  • What happens when the Browser is Closed?

    Hi,
    Does anyone know for sure what happens to your CF template that is running on  the CF server when the browser is closed by the user.  Does the CFML continue to  be processed or is the template aborted?
    Suppose the user hit's submit to  a long running process (relatively) and the user closes the browser.  Does your  code keep running?  Or does CF abort the process?
    This seems to be a  tricky question as I've posed it indirectly for an e-commerce related question  involving CFHTTP (which may be different).
    Thanks,
    hefterr

    The code will keep running, CF has no concept whatsoever of the fact the browser has closed.

  • How do I close a PDF document automatically when the browser is closed?

    I have a web app writen in HTML/ASP. In order to acccess this app, our users have to enter a password and user id. Once on the main page of the app, they can click on a link which opens the reader in another window. Quite often, when finished with the app, they close the browser, but leave the reader window open (with sensitive information). It is becoming to riskly to hope that they remember to close that window also, even with visual reminders. I would like for that window to close automatically when the browser with the app is closed.
    Can this be done?

    Let me elaborate a little more on what I am trying to do.
    (1) A website (#1) is opened after entering a UID and PWD.
    (2) Within website #1, a link is clicked which opens a second web app (#2) in a seperate window using window.open().
    (3) Within website #2, a user can click on a link which opens a PDF as _SELF.
    (4) If the user:
         (a) exits out of website #1 by closing the brower
         (b) we would like to automatically close the PDF from website #2 also, as this contains sensitive information and most of the time the users are forgetting to close it

  • How to force the end of an user session when the browser is closed?

    Hi,
    When the user close the browser, the portal session remains. If the user open a new browser window, we ill be back to the portal without the need of a new Login. Is there any way to force a new login in this situation. A similar problem happens also when there is a reboot in the application server. After the reboot, all users can connect to the App Server without the necessity to login.
    Is ther any way to avoid this kind of behavior?
    Thanks.

    Ok... Its as i thought... unfortunatly...
    Gonna mark your latest post again as possible solution, just in case someone comes with any sort of out of the box thing...
    Thx for your help Kglad

  • How to call a method when the browser is closing

    Hello,
       In my application I need to execute a specific treatment when the WD4A application is closing.  So how can we have a handle method for this specific event.
       I've seen some documentation about the "exit plugs" , and about the doonclose method of the window.. but I don't think it can be useable for me in this case.
    Can you please help me
    Thanks in Advance
    Hamza

    I wrote an insert into the method i set up a break point, the program never call this code and therefore, the new row is never inserted.
    But i think, it's a misunderstand. 
    to summarize :
    I have an application in WD4A
    The application is running, and then I decide to close the browser (in my case internet explorer) and before the browser close I want to execute a piece of code.
    If the method wddoonclose is to be used, is there any default handler or listener to trigger it automatically on the browser closing ?
    If no, how to trigger a method base on this special event .
    Thx
    Hamza

  • Does the sharedObject get destroyed when the browser is closed?

    hey guys, so i just wanted to make sure that when my internet browser is closed it destroys or clears my sharedObject??
    right now i wasnt sure so im doing somehting like the following
    public var sharedObj:SharedObject;
    if(sharedObj != null){
         sharedObj.clear();
    sharedObj = SharedObject.getLocal(...);
    i just wnated to make sure that this is the most effective way to destory the sharedObject just in case there is one left in the browser...
    is there another way to make sure i clear the sharedObjects??

    hello cyber0897,
    No sharedObjects are stored in a cookielike textfile on the clients harddrive, As far as I know there is not an option like with cookies to be destroyed after the browser closes.
    The reset you wrote should be in another order:
    var mySharedObject:SharedObject = SharedObject.getLocal....
    //the above will never give null, because it is created when it doesnt exist.
    //the if (object != null) is useless because of the above, in your post it will be always null, since it is not instantiated...
    mySharedObject.clear();
    mySharedObject.flush(); //not sure if this is neccesary
    You could reset the sharedObject when initializing your application, but if you just want to store variables and get them wherever you need them in your app you could use the singleton class below
    Usage:
    <s:TextInput id="text1" text="@{PrefObj.instance.myString} />
    <s:TextInput id="text2" text="@{PrefObj.instance.myString} />
    (the @ only works in flex 4)
    PrefObj.as
    package
        import flash.events.EventDispatcher;
        [Bindable]
        public final dynamic class PrefObj extends EventDispatcher {
            private static var _instance:PrefObj = new PrefObj();
            public function PrefObj(){
                if (_instance != null){
                    throw new Error("PreferencesManager can only be accessed through PreferencesManager.instance");
            public static function get instance():PrefObj {
                return _instance;
            //add your variables here:
            public var myString:String = "";  

  • Session doesnt expire even after the browser is closed.

    Hi All,
    I have facing this issue for quite some time now.
    1. I login into my application using Firefox. User now can view below the line pages.
    2. Open another window of firefox.
    3. Close the window open in the first step.
    4. Hit the application URL in the second firefox window and u find the user still logged in and can very well browse through all the below the line pages.
    5. Same thing occurs when we use two tabs of the same browser.
    How can i stop this 4m happening?

    Not by using Reflection (the subject of this forum).

  • How to create a backup of History so that even when the History is cleared the backup copy is available?

    My children are using some websites which they are not supposed to watch and when they leave the browser they are clearing all the History and I am unable to know which sites they have visited. Is there any way Not to delete or clear the History when the Browser is Closed? Or is there any way so that I can set up a log file some where in the system which logs all the History and I can access this log file later and monitor the sites and also I shall be able delete this log file whenever I like?
    In fact the History should be turned on and children should not have access to clear the History.

    It can be done.
    The problem is many kids will bypass almost anything you try. They presumably have internet access on phones, friends computers and internet cafes. Even if you block access to the UI for History there is a very simple method of clearing it still.
    If you solve the first problem how do you stop them installing a separate browser, or another copy of Firefox, or even running a new OS off a memory stick.
    There are methods of locking down most things, but you will need to look at the whole computer not just Firefox.

  • How Do I Keep "Find My Mac" Running in the Background Even When My MacPro is Closed?

    When I close my Macbook Pro and it goes to sleep it shuts off the "Find my Mac" feature, When I log into my icloud it doesnt find my Macbook. When I open the Macbook it shows up in iCloud again. My biggest fear is that someone could steal my Macbook and I wouldnt be able to locate it because it will be closed and "find my Mac" will be turned off. How do I leave Find my Mac running all the time, even when the lid is closed?
    Any Suggestions?
    Thanks.

    You don't. Find My Mac works by searching for you mac when it connects to the internet. If the thief never connects to the internet or never opens your mac (you've got to wonder what use it would be to anyone else in either case, to be honest), then you'll never find your mac.
    The only way round that would be to install its own GPS locator like some people do in cars. AFAIK, they haven't build one that'll fit inside an MBP body yet...

  • In adf,how to delete a file generated on server,when the webpage is closed

    Hi,
    I have an application consisting of 2 pages. in the 1st page i will give some input details and when i click on submit, some java code is getting executed in the back. That java code generates a csv file in the server location. after succesful execution of java code, i was redirected to 2nd page. In 2nd page, i am giving option to download and when the user clicked on download button and after the file is downloaded -- in the backend i am deleting the file from the server. Till this point everything is fine. But if the user didnt click on the Download button and instead if he closes the browser, the csv file gets remained on the server itself. This is the issue i am facing .. I am not able to get an idea in ADF Framework, how to delete a file when the browser is closed. Please help me out in this.
    Thanks in advance !!!

    ADF has nothing to do with tracking browser close buttons. What you can do is call a JS function and call the method which deletes the file from within the JS function. ADF has a component for calling java code from JS call.

  • Adware has access to system even when the site is blocked.

    ad.yeildmanager.com and all of its' buddies have free access to my system even when the sites are blocked. It only seems to occur when I am at Yahoo and spammers were using my account.
    Norton, McAfee, MS, and Pest Patrol find no bugs and show life is great.
    Every morning I show new program installed but no listing for it.
    I love the browser but

    This new 'feature' is controlled by these two prefs.
    *security.mixed_content.block_active_content
    *security.mixed_content.block_display_content
    *https://developer.mozilla.org/Security/MixedContent
    *https://addons.mozilla.org/firefox/addon/toggle-mixed-active-content/

  • My phone won't use IMessage even when the person I'm txting has an iPhone why?

    Why won't my phone use iMessage even when the person in txting has an iphone

    I'm having same problem with sending to 3 people from a particular WiFi Network. For two people the iMessage i write is sending, but stops just before Delivery and then says not delivered. For the third person it immediately sends as text message.
    Answered to questions above.
    Can I send to others... Intermittent. Usually no, but then at some point a lot of iMessages comes at once.
    Settings have been enabled.
    Also other persons settings/Messages are enabling iMessage.
    Enabled for WiFi + non roaming cellular ( at my end it should mean only wifi as I am in roaming area with wifi available).
    Numbers are all enabled as we have used them a lot of times, an no changes or upgrades this month.
    So: it seems to me to be a WiFi issue here, but the odd thing is that it sometimes lets iMessages through.
    e-mail and browsing works fine.
    Any suggestions?

Maybe you are looking for

  • Chinese punctuation following English/Latin characters are not rendered

    I'm displaying a mix of English and Chinese in the same paragraph. Whenever chinese punctuation (0xFE00 to 0xFE6F)  is following latin characters (0x0000 to 0x00FF), the chinese punctuation is shown as "empty square". The punctuation displays correct

  • When to declare instance of a class

    I am coding an address book with a GUI and I would like to separate the GUI and the Business logic. Where in my code should I declare an Instance of my Address Class so it can be used thought the code? For example in my business logic class I have a

  • No active windows, no website, no pages no nothing in iWeb...

    Oh my - just upgraded last night to Snow Leopard, afterwards i installed iLife 09. Then I worked 24 hours in iWeb created 2 sites, FTP' both sites to two servers, it was all perfect. Now to the problem. Right now when I start the program again - no w

  • Adobe Flash Player Installer

    Why is the window for the Flash Player installer blank when it opens?

  • Hardware specifications for EBS Modules

    Hi, I want to know the way how to recommend Client about the hardware specifications for Oracle EBS R12 modules implementation. Can anyone give me a link that how the specifications requirement can be gathered for good performance of Oracle EBS. Than