3 ms·
If the purpose is to test static html pages only, what's the problem with just opening them up in the browser with file:// paths? For everyone else who need PHP
by fevangelou 4y ago
If the purpose is to test static html pages only, what's the problem with just opening them up in the browser with file:// paths? For everyone else who need PHP, python, ruby or node they can just use Homebrew to install the relevant packages. The only benefit I see is just sharing a URL with someone else on the same network.
- fiddlerwoaroof 4y agoI’ve run into a couple security limitations when I try to use file:// URLs
- draw_down 4y agoOrigins and schemes (among other things) are important to how content is served on the web.
- deleted 4y ago[deleted]
- makeitdouble 4y agoIt’s a fine app for the mac, but the big impact is really on iOS where you won’t be randomly opening your files in Safari. Also path interpretation is different when you’re in “file” mode and “http” mode
- Kerrick 4y agoIn addition to the other comments people have made, relative URLs that start with a slash don't work the way you probably intend them to if you're browsing around with file:// paths. For example, a webpage located at /Users/example/Sites/example.com/index.html when loaded with file:// URLs will not find /Users/example/Sites/example.com/style.css if you use <link rel="stylesheet" href="/style.css">. (But you probably want to use "/style.css" rather than "./style.css" because then you don't have to keep track of arbitrary depths of ../ being added for files like /Users/example/Sites/example.com/foo/bar/baz/index.html.)