0

I have downloaded the Live Server extension in visual studio code and I have a multiroot workspace. I am testing an html file and I need to reload upon save. I've seen many tutorials update the view of an html file upon save when the file is initially opened with Live Server. I am not getting the updated view of my html in my chrome browser. I have to right click the browser to select reload.

  • Failing to reload upon save:

image

0

I actually figured this out. The problem was that autoreload doesn't happen if the html code is not inside an html tag like the following default structure that you get when you type doc in an html file inside visual studio code.

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>

</body>
</html>
  • doc for html in visual studio code:

image

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.