Clear the heap?

vulture2600:
Since the page is hosted elsewhere, would it make more sense for the server to respond with its' data and then close the connection and wait for a new one?

I wrote a JSON server that does exactly this. It's in the playground:

Arduino Playground - HomePage.

The CORS stuff, now that I think about it, isn't as complicated as that. The pre-flight check is only sent if the request contains stuff beyond doing a simple HTTP get.

The intent of CORS, by the way, is so that I can't write some javascript which when run on your browser, will connect to your bank account using your cookies. The bank responds with a header that says "this JSON service should only be used from webpages that are served up by my servers", and the browser will refuse to make the request that the javascrript has asked it to do.