Can js or jq close the current browser to empty the tabs and specify localstorage?

for example, Baidu"s solution is to use frameworks such as vue and react. Can jq or js achieve this function?
Crab!

Nov.19,2021

close the browser if the tab is empty. Please use sessionStorage


whether you can empty or not has nothing to do with what frame, promise is sure to empty, delete the specified localstorage in the beforeunload event


local storage local is permanent storage, you can only delete it manually, no, you can consider using session


? Just save


by listening for the window.onunload event and manually clearing it in the event method


it is recommended to use sessionStorage

Menu