Safari cannot load local resource into HTML page

Am doing some front-end local development on my Mac, and am running a local Jekyll server. Have created a local default.html file, and a local css file (/css/main.css) which is linked to the default.html file. Problem is that when I open default.html in Safari, it returns an error message saying "Failed to load resource; the requested URL was not found in this server. An error occurred trying to load the resource file:///css/main.css" I have shut down and restarted the Jekyll server, but get the same results; the main.css file will not load, even though default.html loads properly.


Both files can be seen in Finder, so there is no problem there.


Do I need to clear the Safari cache and try again? What else can I do so that the default.html can load the main.css file?

MacBook Air, iOS 11.4.1

Posted on Jul 30, 2018 11:51 AM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari cannot load local resource into HTML page

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.