Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Setting to Use Local Domain Instead of File Protocol In Live Preview #1869

Open
core-ai-bot opened this issue Aug 29, 2021 · 4 comments

Comments

@core-ai-bot
Copy link
Member

Issue by HughxDev
Tuesday Oct 23, 2012 at 05:12 GMT
Originally opened as adobe/brackets#1920


Currently Live Preview opens up documents through the file protocol, as in file:///path/to/index.html. This is bad for development since you can’t use things like root- or protocol-relative URLs, only document-relative (even with <base />). So:

<img src="/img/photo.jpg" />

and

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

…no longer work; you have to use:

<img src="img/photo.jpg" />

and

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

…respectively. This makes migration from a local to remote environment or vice-versa a huge pain, as you have to find/replace every URL in your HTML, CSS, and JavaScript. Also, Typekit breaks, as it’s impossible to add a local filesystem path to a kit’s list of allowed domains. It would be helpful to have an option to make Live Preview open up documents with a custom local domain such as localhost, as in http://localhost/path/to/index.html.

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Tuesday Oct 23, 2012 at 07:51 GMT


@hguiney, does this feature help? https://trello.com/card/3-url-mapping-for-live-development/4f90a6d98f77505d7940ce88/664 You'll still need to set up the local webserver yourself, but hopefully it's a step in the right direction. We're working on this in the current sprint, so it should be available in just a couple of weeks.

@core-ai-bot
Copy link
Member Author

Comment by HughxDev
Tuesday Oct 23, 2012 at 08:00 GMT


Yes, that should do exactly what I want. Pleased to hear it’s being worked on!

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Tuesday Oct 23, 2012 at 18:19 GMT


Great! I'll close this bug, then.

@core-ai-bot
Copy link
Member Author

Comment by MjJuneja
Thursday Mar 16, 2017 at 15:36 GMT


Please help link is not opening and am facing same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant