How can I handle browser tab close event in Angular? Only close, not refresh

后端 未结 5 1966
时光取名叫无心
时光取名叫无心 2020-11-30 09:52

My goal is remove user cookies when browser tab closed.

Is it possible? Can I handle browser tab close event without refresh case?

If I use beforeunlo

5条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 10:21

    Maybe this link will help you http://eureka.ykyuen.info/2011/02/22/jquery-javascript-capture-the-browser-or-tab-closed-event/

提交回复
热议问题