terreng / simple-web-server

Create a local web server in just a few clicks with an easy to use interface. Built with Electron.
https://simplewebserver.org
MIT License
255 stars 67 forks source link

Offline support #144

Closed bjornte closed 1 year ago

bjornte commented 1 year ago

Offline support would be great, e.g. when I am at the cabin.

In my experience, if the computer is offline (e.g. no Wi-Fi connection), the web server does not serve most resources. I get the “Index of /” page, but other resources hangs (spinning browser icon).

If this won't be supported, tips for other offline solutions would be greatly appreciated. I will try this one for now (MacOS).

terreng commented 1 year ago

Hmm. I just tried turning off the WiFi on my mac but I wasn't able to recreate this issue.. Everything still worked.

  1. You're using a localhost address (localhost or 127.0.0.1) right? Is the "Accessible on local network" option enabled?
  2. Are you using the latest version of Simple Web Server? (1.2.8)
  3. Are the resources you're trying to load html pages? Maybe they're trying to load additional resources from the internet and that's why it isn't working. (You could test with just a basic text file / image as the file and see if that works)
terreng commented 1 year ago

Just checking in about this... I'm not able to recreate this issue, so there's nothing I can do at this time. I'm closing this issue for now, but I'm happy to reopen it if I hear back from you.

bjornte commented 1 year ago

Hi Terren,

Apologies for the belated reply on my part. Thank you for having a look at my issue. After more testing, I think the problem is unrelated to Simple Web Server.

I suspect the real problem is that the files are under the Mac's “CloudStorage/Dropbox” folder. In that folder, MacOS seems to be removing local files rather aggressively. I wasn't aware of this since Apple required Dropbox to make this change long after I started using Dropbox (creating a very inconvenient regression for me that wants both Dropbox's cloud backup but also reliable offline availability). So in reality, the files are not stored locally when I try to access them.

Again sorry that I made you have a look at this problem when in fact it had nothing to do with your app.

Best, Bjørn T

terreng commented 1 year ago

Thanks for the update! I'm glad to learn that the problem isn't with Simple Web Server, and I hope you're able to find a solution to that issue.