当我在 Vscode 上点击“保存”时,实时服务器不会自动重新加载

发布于 2025-01-19 18:11:29 字数 117 浏览 3 评论 0原文

过去的某一天,我遇到了这个问题,因为我的文件夹是 .something 以“.”开头。实时服务器无法工作。但现在,我的文件夹不是这样的,但当我在 vscode 上点击“保存”时,Live Server 无法再次正常工作。

Someday in the past, I had this problem because my folder is .something it starts with the "." the live server is not working. But now, my folder isn't like that but the Live Server isn't working right again when I hit save on my vscode.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

孤千羽 2025-01-26 18:11:29

对我来说,我试图保存一个尚未完全HTML的文件。

我用适当的HTML结构包装了代码,现在它的工作正常。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- YOUR CODE -->
</body>
</html>

For me, I was trying to save a file that was not fully HTML.

I wrapped my code with proper HTML structure and now its working fine.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- YOUR CODE -->
</body>
</html>
旧街凉风 2025-01-26 18:11:29

确保头部的元字符集是“UTF-8”。

Make sure meta charset is "UTF-8" in the head.

我三岁 2025-01-26 18:11:29

有一件事可以解决这个问题。

  • 打开设置。
  • 搜索“ AutoSave”。
  • 将其设置为“ Afterdelay”。
  • 在此下方,将AutoSavedElay设置为非常不像5(我已经将其设置为1)的任何内容,
  • 现在在设置中搜索“等待”。
  • 在Liveserver&gt;设置:等待,将值设置非常低(例如3)。无论平台如何,这都应该有助于

There’s one thing that resolves the issue.

  • Open settings.
  • Search for ‘autosave’.
  • Set it to ‘afterDelay’.
  • Just below that, set the AutoSaveDelay to anything very less like 5 (I have set it to 1)
  • Now search for ‘Wait’ in settings.
  • In LiveServer > Settings:Wait, set the value very low (e.g. 3). This should help regardless of platforms ????
梦冥 2025-01-26 18:11:29

我在Sublime Text Ubuntu上使用Live-Server,我注意到我的节省不投入浏览器中的自动保存。

因此,我注意到的是,当我单独打开文件时,而不是作为文件夹解决问题时,问题就解决了。我希望这会有所帮助

I use live-server on sublime text Ubuntu and I noticed that my saves is not committing to the auto save in the browser.

So what I noticed was that when I open the files individually but not as a folder the problem was solved. I hope this helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文