Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

225
Visualizações
Make every link or page with a dedicated reading page

I am trying to make every link or page with a dedicated reading page. For example, I have a lot of pages when visiting one page, storage is made, but the problem comes when he visits another page. He does not start again. He goes to the last id. I want to make each page with its own address.

<script>

      window.onunload = function() {
              var url_string = window.location.href ;
              var url = new URL(url_string);
              var value = document.getElementById("pageNumber").value;
              localStorage.setItem("last", value , url_string );
              var c = url.searchParams.get("c");
              };
              window.onload = function(){
             var url_string = window.location.href ;
              var url = new URL(url_string);
                  var c = url.searchParams.get("c");
              var value = localStorage.getItem("last" , url_string);
              if(value) {
              document.getElementById("pageNumber").value = value;
              window.location.href = "#" + value;
              }
              };

How do I do that and make each link have private storage

Another example https://hululkitaab.com/test/cct.html

https://hululkitaab.com/test/fcvcb.html

If you visited the first link and went to page number 20

When you visit the following link, it will return you to number 20 I do not want this any suggestions

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

what about this:

const pageName = "myPageName";

localStorage.setItem(pageName + "last", value);
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda