Open joepio opened 2 years ago
Properly escaping the JSON is important! A lot of bad advice can be found on the web on how to properly add JSON to your HTML. It's very easy to open up a chance for hackers to run some arbitrary code.
Perhaps we should convert to base64 or something.
Although Atomic-Server feels pretty fast most of the time, the initial load has room for improvement. This is partially due to the amount of round trips:
Include in first HTML
We could improve this by sending more data in the first HTML request:
Downsides of including things in the HTML:
Include script to fetch in first HTML
In the first HTML response, include a script that fetches the
JSON-AD
for the requested resource + properties + classes. Parse the JSON, put it onwindow.atomic
or something, and then when the JS is parsed, add the parsed files.