Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
¿Cómo devolver el contenido anterior del historial con el método window.history.pushState en JS?

Necesito reemplazar el contenido en la misma ventana, pero después de configurar el contenido en la barra de direcciones de la nueva ventana no cambió a uno nuevo, así que traté de configurarlo con un método pushState . Pero el botón de retroceso de los navegadores no carga el contenido anterior, solo cambia la URL

 const newWindow = window.open("http://localhost:4040/mywebsite/newPath", "_self"); newWindow.document.write("<p>I replaced the current window.</p>"); newWindow.history.pushState(null, "", "http://localhost:4040/mywebsite/newPath");
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!