如何强制刷新网页,例如在使用某些CLI工具时?

问题描述 投票:0回答:1

[我注意到使用React CLI开发工具时,我可以打开站点http://localhost:3000/,并且当我更改任何代码(例如App.js中的代码)时,网页将自动刷新以反映内容。

[我起初以为可能是npm start脚本触发了Google Chrome浏览器刷新页面(例如使用Bash open http://localhost:3000/,但是如果我用http://localhost:3000/打开了多个页面,而MS Edge则在浏览页面[ C0],对源代码的任何更改也会强制刷新所有页面。

如何完成?

reactjs webserver page-refresh
1个回答
0
投票

如果我没记错的话,可以通过http://localhost:3000/完成:

© www.soinside.com 2019 - 2024. All rights reserved.