HTML5:记住 Firefox 中的位置设置
我有一个带有 Google 地图组件的页面,我在启动地图时使用 navigator.geolocation.getCurrentPosition()
,以便可以显示“本地”项目。
一切都很好,除了位置提示的行为 - 过去我以为我已经看到您可以选择允许 FireFox 记住此设置,但它要么已从 FireFox 中删除,要么有一些标志/设置我没有使用它来实现这一点...有人有任何见解吗?
请参阅此页面以获取“记住”复选框的屏幕截图:
http://diveintohtml5.info/geolocation.html
谢谢,
Paul
编辑:
好的,看起来我只在 FireFox 4 中看到这个问题,因为它似乎没有给我在提示中记住站点的选项,这意味着它会提示每个 时间。 FireFox 3.5 按预期工作。这是预期的行为吗?我可以通过进入页面的页面信息来手动将其设置为从不询问,但典型用户不会知道如何执行此操作。
I have a page with a Google Maps component, and I am using navigator.geolocation.getCurrentPosition()
on initiating the map so that I can show "local" items.
Everything works great, other than the behavior of the location prompt - In the past I thought I had seen where you could choose to allow FireFox to remember this setting, but that has either been removed from FireFox, or there is some flag/setting that I'm not using that would enable this... anyone have any insight?
See this page for a screencap of the 'remember' checkbox:
http://diveintohtml5.info/geolocation.html
Thanks,
Paul
EDIT:
Ok, looks like I am only seeing this issue in FireFox 4, in that it doesn't seem to give me the option to remember the site in the prompt, which means it prompts each and every time. FireFox 3.5 works as expected. Is this expected behavior? I can manually set it to never ask by going into Page Info for the page, but the typical user is not going to know how to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,看来 FF 4.0.1 版本没有“记住权限”复选框...用户每次点击该页面都会收到提示,直到执行以下步骤:
右键单击 -> 选择“记住权限”。 “查看页面信息”->“权限”选项卡->“共享位置”,然后取消选中“始终询问”,将单选按钮设置为“允许”。
似乎大多数人永远不知道要在那里寻找此设置,希望他们重新引入对话框“记住”复选框。
Well, it appears that version 4.0.1 of FF doesn't have the 'remember permission' checkbox... the user will get prompted each and every time they hit the page until they perform the following steps:
Right-Click->'View Page Info'->'Permissions' Tab->'Share Location' and then un-check 'Always ask' set the radio button to 'allow'.
Seems like most people would never know to look there for this setting though, hopefully they re-introduce the dialog 'remember' checkbox.
如果您已经授予许可,Firefox 将不会再次询问。您可以根据 http://www.mozilla.com/en/firefox/geolocation/< 撤消它/a>
If you did already gave permission, Firefox will not ask again. You may undo it according http://www.mozilla.com/en/firefox/geolocation/