How does google reflect changes(like file rename) in one tab to other tab in drive?

For example, I opened a document named "Doc1" from my drive. If I rename it to "Doc2" from the drive explorer, the opened document in the other tab gets reloaded and changes it's name. I want to know exactly how google does this? I learnt somewhere that it uses Html5 storage for this.

enter image description here

enter image description here

enter image description here



You can definitely implement this using HTML5 localStorage. Whenever the script in any of the open tabs adds or changes an item stored there, the other tabs receive a "storage" (or "onstorage" for IE) event.

If you give each document a unique identifier, and store a dictionary mapping identifier->filename for all open files, you can change those names from any tab. Or you can simply store an array of files that need updating, and have the tabs reload themselves (including their updated "filename") from the server.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.