Question

I am developing a web application and my requirement is as specified below.

  1. I need to display four websites in a single browser window...(which i implemented using frameset)
  2. I need to refresh the whole page (which certainly will refresh frames inside ) after 1 minute to update the frames content....(which i implemented using the java script)...

however in one of the frames i need to login to the 3rd party website. i am able to login and able to view the content after the login...however when the page refresh happens after 1 minute the page will be redirected back to the login page again and i have to login after each page refresh...

I googled this and found that it might be due to frames which does not set the cookies.for this i have implemented P3P policy also but the problem persists...

please provide the solution if anybody knows about this...

The javascript I used to refresh a page is

function timeRefresh(timeoutPeriod) {
        window.setTimeout("location.reload(true);", timeoutPeriod);

    }
    window.onload = timeRefresh(60*1000);
Was it helpful?

Solution

If the cookies for the 3rd party site are set then your P3P looks fine and you can navigate fine for over a minute without losing session then the problem must be something with the timeRefresh()

As you can't get a customized URL of the 3rd party site in order to issue a specific reload and assuming that you have no control over the third party site, I suggest you do something different. Set up some JavaScript to load an image from the site (the logo or something else that won't change, or alternatively a script or page) every minute from a frame that you have control over. Because the browser is the same, any existing cookies from a login will be referenced and it will extend the login.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top