VSCode-Browser-Sync icon indicating copy to clipboard operation
VSCode-Browser-Sync copied to clipboard

Classic ASP page doesn't refresh

Open dotnetshadow opened this issue 8 years ago • 6 comments

Hi there,

I've been trying to use your plugin but I can't seem to get any changes working

I have a basic classic asp website http://dev.foo.localost

In my hosts files I map 127.0.0.1 dev.foo.localhost

I then use your plugin and choose BrowserSync: Proxy mode in browser I enter http://dev.foo.localhost/test/ Then for relative path I enter *.asp|css/*.css

When I edit the file default.asp no changes are sent to my server I have to manually refresh the page

Is there something I'm doing wrong?

dotnetshadow avatar Aug 18 '17 06:08 dotnetshadow

@dotnetshadow How about enter http://127.0.0.1 ?

Jasonlhy avatar Aug 18 '17 11:08 Jasonlhy

Tried that bit couldn't get it to work with 127.0.0.1

I've tried browser-sync through now the server method works but proxy didn't but sure if it's related?

dotnetshadow avatar Aug 18 '17 12:08 dotnetshadow

I tried asp under window 10, and found some tricky things to make it work under proxy mode.

Wrap response.write inside body tag

This is a known limitation of Browser Sync

For example,

<!DOCTYPE html>
<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>
    <%
        response.write("Helloaaaaa")
    %>
</body>
</html>

HTTP/1.1 404 Not Found

If you faced HTTP/1.1 404 Not Found during reload, you can save the file twice or set the delay of the reload

Jasonlhy avatar Aug 19 '17 12:08 Jasonlhy

I'll have a go at this, I didn't notice a 404 j, but i never liked at the source.

I'll see if that's the problem and report back

dotnetshadow avatar Aug 20 '17 02:08 dotnetshadow

Thanks for your help, I managed to get it working. Had to use nested syntax for files /**/*.asp

Just a few things:

  • If you are on the Welcome screen nothing pops up after selecting from command palette
  • Proxy in browser works well, the side panel one doesn't seem to work for me, doesn't show the correct url. It's showing the directory path
  • Would be nice to be able to edit the url in the side panel, currently you can't edit it

dotnetshadow avatar Aug 21 '17 02:08 dotnetshadow

@dotnetshadow Thanks for your feedback and suggestion. To answer couple of your questions.

  • If you are on the Welcome screen nothing pops up after selecting from command palette A: The pops up is vscode API, may be this is a bug of vscode, I need to double check with the vscode issue

  • Proxy in browser works well, the side panel one doesn't seem to work for me, doesn't show the correct url. It's showing the directory path A: This is a bug, I forgot to change the path of the side panel if using proxy mode.

  • Would be nice to be able to edit the url in the side panel, currently you can't edit it A: Good idea, will be implemented later.

Jasonlhy avatar Aug 21 '17 04:08 Jasonlhy