You run into this on microcontroller based "web servers" because you're not really running a proper web server following the HTTP protocol- you're just returning your HTML content directly on the socket. Ask me how I know :-) Ran into the same problem on the Raspberry Pi Pico W.
Anyway, how do you fix this? I did the following (the client variable is the open socket you're writing back on):
html = "Your HTML code or generator goes here, along with your javascript that isn't working"
client.send("HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n")
client.send(html)
client.close()
That's about the bare minimum you need to pretend to be following the HTTP protocol. Then Safari won't put your webpage in its sandbox.
Topic:
Safari & Web
SubTopic:
General
Tags: