4 ms·
> I do local development over file:// a lot. Not meaning to pick at anything here, but to me web dev necessarily requires knowledge and configuration of a web
by sublinear 3y ago
> I do local development over file:// a lot.
Not meaning to pick at anything here, but to me web dev necessarily requires knowledge and configuration of a web server.
What's being sent to the browser in a production setting is an HTTP message, not just the web content.
Many features of a non-trivial web page/app will at least require HTTP headers to be set. The "file://" protocol handles this by mocking the full HTTP response for you in the browser, but any deviation from that response on an actual web server has the potential to break your page. I wouldn't rely on opening files directly.