Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Setting to Use Local Domain Instead of File Protocol In Live Preview #1920

@HughxDev

Description

@HughxDev

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions