当サイトはユーザー体験を改善するためのメンテナンスを実施中に機能が制限される予定です。記事を読んでもあなたの問題が解決せず質問をしたい場合は、Twitter の @FirefoxSupport、Reddit の /r/firefox で、サポートコミュニティが皆さんを助けようと待機しています。

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

Auto Scrolling page to same position after refreshing?

  • 1 件の返信
  • 1 人がこの問題に困っています
  • 1 回表示
  • 最後の返信者: 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?

すべての返信 (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.