A
A
Anton V.2020-01-28 00:15:34
JavaScript
Anton V., 2020-01-28 00:15:34

When duplicating a tab in Chrome, old data?

Good afternoon!

There is a SPA, when the site opens, the data is loaded (State 1), later, when interacting with the site, the data in the variables and on the server changes (State 2).
When I duplicate a tab, the page has all the data as in State 1. and requests to the server are not made to get the updated data.

What needs to be done so that when duplicating, either the current state is taken or there was a fresh start ...

I would be very grateful for any information, since I could not find it in Google for keywords.

Good mood to you all!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Shohruh Shaimardonov, 2020-01-28
@joeberetta

If you want info from the server to be updated in all tabs as the data changes (in the server), then dig towards websocket.
Z.s. and if you don’t want to rewrite the entire architecture, then just a good old crutch: Location.reload()
Through setTimeout ()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question