HTML and CSS Reference
In-Depth Information
Moving to a web server
Up until this point we have been loading the tasks.html page directly from the file-system.
We now need to move to serving our pages from a web server. Several of the APIs we will
be using in the next few chapters rely on pages being served from a specific domain - even
if that domain is “localhost” rather than “yourserver.com”.
For instance, if a website wants to store data on the client, the browser must be able to dis-
tinguish between the data created by one website and the data created by another. Rules
such as this are referred to as “same-origin policies”. The browser uses the domain name
and the port (which usually defaults to 80 or 443 - but will be 8080 in our case) to determ-
ine the origin of a web page, and restricts interaction between pages with different origins
(except where specified).
This chapter will help get you started with the Mongoose webserver. This is one of the
smallest web servers available, and requires very minimal configuration.
Search WWH ::




Custom Search