T
T
Test Test2015-06-08 11:33:41
Yii
Test Test, 2015-06-08 11:33:41

How to make in Yii that the session is deleted after the browser is closed?

Good afternoon. Do not tell me how to make the session be deleted after closing the browser tab.
Piece of code:

$referrer = Yii::app()->session['VoximplantReferrer'];
if(empty($referrer) ) {
  $referrer = Yii::app()->session['VoximplantReferrer'] = Yii::app()->request->urlReferrer;
}

The script will now save the referrer. But if you close the tab. and log in from another referrer, the script will show the old entry...
Note:
If you completely close the browser, then only the session is deleted.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2015-06-08
@cubooks

Clear cookies before leaving on the client
https://www.google.ru/webhp?sourceid=chrome-instan...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question