为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

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

详细了解

URL ends with #

  • 4 个回答
  • 1 人有此问题
  • 12 次查看
  • 最后回复者为 cor-el

more options

if a URL ends with '#'(like "http://www.example.com/diamond-diva/p/ds444444#") and press Enter key in addressbar then it does not send request but if i press F5 then it reloads the page. What it is behaving like this ?

if a URL ends with '#'(like "http://www.example.com/diamond-diva/p/ds444444#") and press Enter key in addressbar then it does not send request but if i press F5 then it reloads the page. What it is behaving like this ?

被采纳的解决方案

The # character refers to an internal location in a page. For example, when you see a table of contents in an article, those entries may go to different locations in the page by adding # and a label after it. If you mouse over the links below the video in the following article, you'll see what I mean: Where to find and manage downloaded files in Firefox.

So... if you have that page open already, and you press Enter on that URL, instead of reloading the page, Firefox will simply try to go to that label in the page. When there is # without anything after it, the result is that nothing happens because that's not a valid label name.

You might be wondering why you have a URL with a useless # at the end of it. The typical scenario is that you click a link that was supposed to run a script. The link didn't have a "real" URL, just # as a backstop to prevent you from accidentally leaving the page. Carefully written scripts usually cancel the link so you never see the URL with the useless # at the end, but many of them don't.

There. Way more than you wanted to know.

定位到答案原位置 👍 0

所有回复 (4)

more options

选择的解决方案

The # character refers to an internal location in a page. For example, when you see a table of contents in an article, those entries may go to different locations in the page by adding # and a label after it. If you mouse over the links below the video in the following article, you'll see what I mean: Where to find and manage downloaded files in Firefox.

So... if you have that page open already, and you press Enter on that URL, instead of reloading the page, Firefox will simply try to go to that label in the page. When there is # without anything after it, the result is that nothing happens because that's not a valid label name.

You might be wondering why you have a URL with a useless # at the end of it. The typical scenario is that you click a link that was supposed to run a script. The link didn't have a "real" URL, just # as a backstop to prevent you from accidentally leaving the page. Carefully written scripts usually cancel the link so you never see the URL with the useless # at the end, but many of them don't.

There. Way more than you wanted to know.

more options

Thanks for replaying! Then why 'F5' key reloads the page whereas 'Enter' key does nothing on the same URL("http://www.example.com/diamond-diva/p/ds444444#") ?

more options

The F5 key (or Ctrl+r) forces a reload. When you press Enter on a URL that has a #label, Firefox follow the same logic as clicking a link in the page, which is, if that page already is open in that tab, go to the #label.

more options

You need to make sure that you aren't blocking JavaScript.

Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.

  • Press and hold Shift and left-click the Reload button.
  • Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
  • Press "Command + Shift + R" (MAC)

Start Firefox in Safe Mode to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).

  • Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.