From the course: Building Great Forms with HTML and CSS
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
GET and POST methods
From the course: Building Great Forms with HTML and CSS
GET and POST methods
- [Instructor] To understand the difference between GET and POST, let's step back and examine how HTTP works. Each time you want to reach a resource on the web, the browser sends a request to a URL. An HTTP request consists of two parts, a header, that contains a set of global metadata about the browser's capabilities, and a body that can contain information necessary for the server to process this specific request. The GET method is the method used by the browser to ask the server to send back a given resource. It says, "Hey server, I want to get this resource". In this case, the browser sends an empty body. Because the body is empty, If a form is sent using this method, the data sent to the server is appended to the URL. GET allows the browser to cache the results of the form submission, and it also allows the user to bookmark the page once the form has been submitted. However, GET is limited in the amount of content in…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.