如何在不离开我的 Web 开发 IDE 的情况下重新加载/刷新网页? [英] How to reload/refresh a web page without leaving my web development IDE?

查看:22
本文介绍了如何在不离开我的 Web 开发 IDE 的情况下重新加载/刷新网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我构建网站时,我使用 2 个显示器.我的开发 IDE 在主显示器上,网页在辅助屏幕上打开.

When I build websites I use 2 monitors. I have my development IDE on the main monitor and the web page open on the secondary screen.

每次我需要刷新网页时,我都必须使用鼠标,移动到另一个屏幕并单击刷新,这让我很恼火.

I get annoyed that everytime I need to refresh the web page I have to go to my mouse, move over to the other screen and click refresh.

我想要一个快捷键,以便在需要时重新加载网页.以类似于 Winamp 如何将键映射到播放/暂停等常用功能的方式.

I would like to have a shortcut key mapped to reloading the web page whenever I need. In a similar way to how Winamp maps keys to common functions like play/pause etc.

我发现可以从命令行控制现有的 FireFox 进程,但它所能做的最好的事情是创建一个具有特定 URL 的新窗口.

I have discovered that an existing FireFox process can be controled from the command line, however the best it can do is create a new window with a specific URL.

firefox -remote "openURL(www.mozilla.org, new-tab)"

文档在这里:https://developer.mozilla.org/en/Command_Line_Options

还有一个 Firefox 扩展会定期刷新网页.然而,这会导致页面不断闪烁,也会浪费资源.

There is also a firefox extension that will refresh the web page periodically. However this results in a constant flickering of the page and will also be wasteful with resources.

https://addons.mozilla.org/en-US/firefox/addon/115/

  • 用于 Firefox/Chrome 的可自定义全局热键,用于重新加载当前选定的标签
  • 可以从全局热键触发的浏览器扩展
  • 从命令行重新加载当前选定选项卡的命令,然后我可以将其映射到热键(是否可以添加带有扩展名的额外远程命令?)

有人知道我怎么做吗?谢谢!

推荐答案

在 Windows XP 中,这应该可以:

In Windows XP, this should work:

  • 创建一个名为 refresh.vbs 的 VBS 文件:

  • Create a VBS file called refresh.vbs:

Set WshShell = WScript.CreateObject("WScript.Shell") 
WshShell.AppActivate("Firefox")
WshShell.SendKeys "{F5}"
WshShell.AppActivate("TextPad")

  • 在桌面上创建此文件的快捷方式.

    右键单击快捷方式图标并转到Properties.

    • General 选项卡中,单击打开方式"旁边的更改"按钮.浏览到 C:WINDOWSsystem32cscript.exe选择基于 Microsoft 控制台的脚本宿主.

    • In the General tab, click on the Change button next to "Opens with". Browse to C:WINDOWSsystem32cscript.exe Select Microsoft Console Based Script Host.

    Shortcut 选项卡中,输入一个快捷键,例如 CTRL + ALT + R.在运行下拉菜单中,选择 Minimised.

    In the Shortcut tab, enter a Shortcut key e.g CTRL + ALT + R. In the Run dropdown, select Minimised.

    现在,当您按下 CTRL + ALT + R 时,它将刷新 Firefox 中的当前选项卡.

    Now, when you hit CTRL + ALT + R, it will refresh the current tab in Firefox.

    这篇关于如何在不离开我的 Web 开发 IDE 的情况下重新加载/刷新网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆