V
V
Valery Orlov2019-10-14 15:29:43
JavaScript
Valery Orlov, 2019-10-14 15:29:43

How to exclude Javascript multiple loading?

In the Google Chrome extension, an event is set that monitors the loading of a specific page of the site exemple.com:

$(document).ready(function(){
  //Выполняемое действие;
});
If the page is opened multiple times, then the javascript code will be executed many times. Is it possible to fix the event in such a way as to prevent Javascript from being loaded multiple times? Like: Opened the browser, loaded the page, the event worked and waits for the next browser opening and page loading.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artur Karapetyan, 2019-10-14
@architawr

You need sessionStorage.
tyk
tyk
tyk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question