Whenever a user visits a page (i.e. url), the interaction between the client (browser, in JavaScript) and the server (in OCaml) should follow these steps:
- The server returns a very basic HTML page that includes a reference to the JavaScript script.
- The client downloads the referenced JavaScript (normally already cached in the browser).
- The script then creates async JavaScript requests to the server based on
url.
- The server replies to async requests only with data in JSON format.
- The client uses the data to generate the user interface.
Any further interaction with the page should also create JavaScript async requests.
Whenever a user visits a page (i.e.
url), the interaction between the client (browser, in JavaScript) and the server (in OCaml) should follow these steps:url.Any further interaction with the page should also create JavaScript async requests.