搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Chrome scrolls to element while Firefox doesn't for this URL with #

  • 4 个回答
  • 0 人有此问题
  • 13 次查看
  • 最后回复者为 tristan.robet

more options

Chrome scrolls to element while Firefox doesn't for this URL with # :

https://www.service-public.fr/particuliers/actualites/A15610#titreChapitre_-5776306477855185115

There is an element with id "titreChapitre_-5776306477855185115" in the page (chapter "Personnes ayant un test de dépistage positif" which means "People who test positive to Covid", Chrome will scroll to this chapter (well, at least 60% of time it auto scrolls to the element) while Firefox will always display the top of the page.

Firefox is slightly better and more similar to Chrome on the english version for some reason : https://www.service-public.fr/particuliers/actualites/A15610?lang=en#titreChapitre_-5634635573997558496

Chrome scrolls to element while Firefox doesn't for this URL with # : https://www.service-public.fr/particuliers/actualites/A15610#titreChapitre_-5776306477855185115 There is an element with id "titreChapitre_-5776306477855185115" in the page (chapter "Personnes ayant un test de dépistage positif" which means "People who test positive to Covid", Chrome will scroll to this chapter (well, at least 60% of time it auto scrolls to the element) while Firefox will always display the top of the page. Firefox is slightly better and more similar to Chrome on the english version for some reason : https://www.service-public.fr/particuliers/actualites/A15610?lang=en#titreChapitre_-5634635573997558496

被采纳的解决方案

Oh ok I see, for some (probably very bad) reason, they have a few different values of ID which rotates each time you reload without cache (Ctrl + F5), so it's impossible to use the ID of a chapter to reference it in a reliable manner, but it sometimes works.

It was pure randomness my tests worked more in Chrome than in Firefox, sorry to bother you with this.

定位到答案原位置 👍 0

所有回复 (4)

more options

I see this ID: titreChapitre_8985960623098541122 for that element.

For search for elements that have an ID that starts with titreChapitre shows four results.

more options

选择的解决方案

Oh ok I see, for some (probably very bad) reason, they have a few different values of ID which rotates each time you reload without cache (Ctrl + F5), so it's impossible to use the ID of a chapter to reference it in a reliable manner, but it sometimes works.

It was pure randomness my tests worked more in Chrome than in Firefox, sorry to bother you with this.

more options
more options

Yes, you are right, thank you, and it also works for the english version