I have created Login page, based on localStorage. On loading the page I have checked the value of localStorage. If I opened the web page in more than one tab and then I logo
This can also be done with an HTTP header if you are able to set one either in Apache or from a server-side script like PHP:
Clear-Site-Data: "cookies", "storage", "executionContexts"
E.g. in PHP:
header('Clear-Site-Data: "cookies", "storage", "executionContexts"');
The key thing to note here is the "executionContexts" directive. From the doc:
"executionContexts"
Indicates that the server wishes to reload all browsing contexts for the origin of the response (Location.reload).
The compatibility in certain browsers (ahem..IE/Edge) is unknown at this time but there is support for this header in most good browsers.