Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8726431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:14:35+00:00 2026-06-13T08:14:35+00:00

I want to communicate between two different tabs in the same browser (on the

  • 0

I want to communicate between two different tabs in the same browser (on the same domain).

When a specific event fires in the second tab, I change a localstorage variable value (using Javascript). I want to detect this change on the first tab. The variable is named “status” and the value changes from 0 to 1

I was thinking for a possible solution and I think that using a timer on the first tab will work, but I think also that there must be a better way.

Do you know if there is any way to detect when the “status” variable value changes without using a timer?

Thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:14:36+00:00Added an answer on June 13, 2026 at 8:14 am

    It seems that Storage events should provide what you need.

    The HTML spec on storage events ( http://dev.w3.org/html5/webstorage/#the-storage-event )
    says :

    The storage event is fired when a storage area changes, as described
    in the previous two sections (for session storage, for local storage).

    When this happens, the user agent must queue a task to fire an event
    with the name storage, which does not bubble and is not cancelable,
    and which uses the StorageEvent interface, at each Window object whose
    Document object has a Storage object that is affected.

    Note the final clause, all windows which have access to the storage should be notified of any change.

    However note the following clause in previous section of the spec :

    When the setItem(), removeItem(), and clear() methods are called on a
    Storage object x that is associated with a session storage area, if
    the methods did something, then in every Document object whose Window
    object’s sessionStorage attribute’s Storage object is associated with
    the same storage area, other than x, a storage event must be fired, as
    described below.

    So the document which provoked the change is not alerted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to communicate between two computers that aren't on the same network, i
I want to communicate between two different WPF windows. The WPF UI in first
I want to communicate between two or more dialog windows,when i say communicate It
I am creating server-client application for iPhone. I want to communicate between two application
I just want to know that is it possible to communicate two different apps
How can I communicate between two PC's via USB? I want a program to
I want to be able to communicate between two machines that are running Windows.
I want two separate programs written in Pascal communicate between themselves using additional text
I want to use netlink to communicate between an application and kernel space. My
What is the difference between TCP listener and TCP server? I want to communicate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.