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

搜索 | 用户支持

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

详细了解

what has replaced "window.home" as it is documented as obsolete

  • 7 个回答
  • 1 人有此问题
  • 4 次查看
  • 最后回复者为 biol75

more options

Hi, on the support page, https://developer.mozilla.org/en-US/docs/Web/API/Window/home it says that

window.home()

is Obsolete since Gecko 31 (Firefox 31 / Thunderbird 31 / SeaMonkey 2.28, but it gives no hint if there is a replacement or equivalent way of going to the user's home page

thanks chris

Hi, on the support page, https://developer.mozilla.org/en-US/docs/Web/API/Window/home it says that window.home() is Obsolete since Gecko 31 (Firefox 31 / Thunderbird 31 / SeaMonkey 2.28, but it gives no hint if there is a replacement or equivalent way of going to the user's home page thanks chris

所有回复 (7)

more options

Are you talking about about:home ?

more options

FredMcD said

Are you talking about about:home ?

Sorry, this was code to load the users' home page into the current window, and used to work with older firefoxes

more options

I've called the big guys to help you. Good luck.

more options

See:

  • bug 1012944 - User login and account creation on deezer.com broken since Firefox 30.0b1, say home.display is not a function

Please do not comment in bug reports
https://bugzilla.mozilla.org/page.cgi?id=etiquette.html

more options

Do you mean a method a website can use, or a method an extension can use? I don't think there is a method a website can use to navigate a tab to the user's home page. However, an extension probably can do that using a method in the SDK.

more options

Actually this does work for me in Firefox 31 if I run this command (window.home()) in the Web Console with this page open and it brings me to my home page (about:about) in the same tab. The Back button brings me to the previous page. I'm not sure why you would ever allow a website to navigate this way if that is possible.

The above linked articles writes:

The non-standard, Netscape-derived window.home, window.back and window.forward methods have been removed. The standard history.back and history.forward methods can be used instead to manipulate the browser history.
more options

Thanks for the comments. I'm sorry to learn that a "netscape" command is non-standard, but appreciate time moves on.