Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Auto Scrolling page to same position after refreshing?

  • 1 trả lời
  • 1 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi user2258076

more options

Hello! When I working with developing web pages I testing some element in the middle or bottom of page. Then, when I edited some css files I need refresh page - to see changes in frontend. When I do it in Chrome - it scrolling page to same position automatically. But in Firefox I need to scroll page manually each time I refresh page. Is it possible to fix it?

Hello! When I working with developing web pages I testing some element in the middle or bottom of page. Then, when I edited some css files I need refresh page - to see changes in frontend. When I do it in Chrome - it scrolling page to same position automatically. But in Firefox I need to scroll page manually each time I refresh page. Is it possible to fix it?

Tất cả các câu trả lời (1)

more options

Hello, this brigade engineering article might help you out.

From what I've gathered, in traditional websites, scroll restoration works fine in most browsers (including Firefox). But for single page applications, page loads can happen even before all site content is available so scroll restoration is typically not available (except in Chrome).

To enable it, I'd guess that you have to work from your application's code, the method to do that could depend on the framework you are using to build your application.

I'm not knowledgeable in single page app development but maybe you could try setting the History.scrollRestoration to 'auto' in the History API.