Third-party application in iFrame must support header / top frame session

The page has a title and an iFrame. IFrame has content from a third-party application. A third-party application runs from a server other than the page. The user will spend most of his time in the iFrame.

If the user spends most of their time in the iFrame, the top page session expires.

What are some possible ways to prevent this? Is there a way to detect post back events in an iFrame and increase the timeout timer on the top page?

Any sample code is welcome.

thank

+3
source share
2 answers

IFrame , 10 ( , - ). , , .

EDIT,

        var frameHTML='';
    function CheckFrame() {
        //get frame BODY
        var frameBody=$("#FFRAMEID1" + _frameNumber).contents().find("body").html();

        //Compare
        if(frameBody==frameHTML) {
            //Content has not changed.  Do not refresh main session.
        }
        else {
            //Content has changed.  Refresh main session.
        }

        //Set most recent check string
        frameHTML=frameBody;

        //Set OTHER hidden frame source to refresh main page (could be replaced by just an AJAX call)
        $('#FRAMEID2').attr("src", 'FRAMESRC');
    }
+2

, , , , , - . - , .

cookie, . , cookie . , cookie, , .

, , .

0

Source: https://habr.com/ru/post/1762017/


All Articles