If you have a Google account, you can save this code to your Google Drive.
Google will ask you to confirm Google Drive access.
Save file as: Save file
Warning: The 10th of June 2021, we will discontinue the ability to save to Google Drive.You will still be able to access your stored code on Google Drive.
If you have saved a file to Google Drive, you can open it here:
Open file
The Storage Event is triggered when there is a change in the window's storage area.
Note: The storage event is only triggered when a window other than itself makes the changes.
Therefore, in this example, a hidden iframe is used. The hidden iframe has one mission; whenever it is targeted, it will change the value of a local storage item named "mytime" with the value of the current date in milliseconds.
The url property belongs to the Storage Event object, and returns the url of the page where the item was changed.
The url of the page where the item was changed:
If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:
help@w3schools.com