Hello comrades! Happy you! Such is the task, I'll start from the beginning:
There is the most common HTML document that contains two tags:
<script>code...</script>
A script is written that will, without reloading the page, show the desired one instead of the one we see (fixing it through Ajax ). Each page will have a name, javascript code, and the body of the page. Actually the question is: how to track if the label already in the HTML document
<script>code...</script>
There may be several of them and they may contain different code. However, if a person loads the same page several times, the same code will be added between
<head>...</head>
but do not need to do this. Is it possible to track this? Is it possible to numbered them somehow, put them in an array for tracking?