Start course

To really understand how HTML5 works, you need to have some idea of how the internet works. In this first module, web fundamentals, we’ll take a deep dive into the world of http/s, URLs, clients and servers, and security. This first module is mostly theoretical, and there are no practical activities involved with it.  


Once a client makes an HTTP request to a server, that server will send an HTTP response. In this video, we'll focus on the different kinds of response a server can send. And the different elements that make up the response. First up, the server can either send a simple or a full response. A simple response happens when the server only supports HTTP 0.9 and would be a file or some data. In a full response, for a server using HTTP 1.0 and above, the first line will always be a status line. The status line includes three things. The HTTP version, a standard status code and a reason phrase. The HTTP version will be either 1.0, 1.1 or 2.0. The status code will be a standard three-letter internet server format. The reason phrase will just be a textual representation of the code. 

So if a server returned a 404 status code, it's accompanied by a message that says that the resource is not found. Other popular codes are 200, which means the request was OK. 304 which means the resource has not been modified. 403 which means the request was forbidden and 503 which means that the server encountered some form of error processing the request. The second part of a full response is the MIME-like message, which is generated by the server itself. This will have various header fields separated from the message body by a carriage return line feed, or CRLF, pair. The header information doesn't relate to the content of the message and gives context to the response. 

These can describe aspects of the resource, like its content type, which could be text or plain or application, JSON, an expiry date, and the software the server uses. The header type information can be useful in helping security. The message body contains the requested resource. If the resource is an HTML file, the header information can be modified using the meta tag. The MIME message can also be generated dynamically if the resource is a backend server script. These scripts often use information supplied by a client like query parameters or form data, and may interact with other programs or resources running on the web server. An example of this is creating new information in a database. 

It's important to generate a valid MIME message as a response, complete with all the appropriate header fields. So it's necessary to have some knowledge of the MIME message format to write scripts. And that's it for this video. HTTP server responses can either be simple or full. Full responses will always include a status line and MIME-like message.


About the Author
Learning Paths

Ed is an Outstanding Trainer in Software Development, with a passion for technology and its uses and holding more than 10 years’ experience.

Previous roles have included being a Delivery Manager, Trainer, ICT teacher, and Head of Department. Ed continues to develop existing and new courses, primarily in web design using: PHP, JavaScript, HTML, CSS, SQL, and OOP (Java), Programming Foundations (Python), and DevOps (Git, CI/CD, etc). Ed describes himself as practically minded, a quick learner, and a problem solver who pays great attention to detail. 

Ed’s specialist area is training in Emerging Technologies, within Web Development. Ed mainly delivers courses in JavaScript covering vanilla JS, ES2015+, TypeScript, Angular, and React (the latter is authored by Ed) and has delivered on behalf of Google for PWAs. Ed has also developed a new suite of PHP courses and has extensive experience with HTML/CSS and MySQL. 

Ed is responsible for delivering QA’s Programming Foundations course using the Eclipse IDE. His skillset extends into the DevOps sphere, where he is able to deliver courses based around Agile/Scrum practices, version control, and CI/CD.

Covered Topics