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

302
Views
How to fix scroll only for a specific page even if click return to back button with Next.js

is there a way to fix scroll only for a specific page with Next.js?

The situation is as follows.

  1. There are A page and B page in Next.js

  2. Go from Page A to Page B using "Router.push"

  3. Scroll on page A (assuming you scroll down to 5000 scroll.y)

  4. Go to page B

  5. press the browser's back button to return to page A from page B.

  6. scroll is 0

What I want to do is to keep the initial scroll(5000) state at 6.(even if click return to back button)

I want to fix the scroll instead of recording the scroll position back (for example local storage)

please let me know if there is any good way.

Thanks for reading my question.

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!