Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

222
Vistas
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 Respuestas
Responde la pregunta

0

what about this:

const pageName = "myPageName";

localStorage.setItem(pageName + "last", value);
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda