AJAX Expert Course (Next Level) 2025
- Descrição
- Currículo
- FAQ
- Revisões
*** THE BEST ADVANCED AJAX COURSE ***
-
Master Asynchronous Requests: Learn how to make seamless HTTP requests with AJAX.
-
Explore Advanced Concepts: Dive into heavy topics such as HTTP Basic Auth, CORS, and RESTful APIs to understand how they integrate with AJAX.
-
RESTful API Project: Work with various tools like XMLHttpRequest, Fetch API, and Axios to implement AJAX in a real-world project.
-
Build Dynamic Applications: Discover how to effectively manage and manipulate data using AJAX for a smoother user experience.
-
Learn Advanced Techniques: Understand modules, error handling, and best practices for optimizing your AJAX calls.
This AJAX advanced course will teach you how to use AJAX in different ways, and also teach you how to solve common issues you’ll face when working with AJAX. Real life practical training.
What This Course Covers
In this advanced course, we will cover a wide range of topics that are essential for mastering AJAX:
-
The fundamentals of making asynchronous requests
-
How to implement HTTP Basic Authentication and handle CORS issues
-
A thorough understanding of RESTful APIs and how they work with AJAX
-
Practical coding examples using XMLHttpRequest, Fetch API, and Axios
-
Techniques for error handling and debugging AJAX requests
-
Building projects that utilize AJAX for dynamic content updates
Even if you have little knowledge about AJAX, I’ve got you covered.
I do have a fundamentals AJAX course that provides a summary of AJAX. But in this advanced course, we start building projects together and from Section 4 we start digging into advanced concepts like Basic Auth, CORS and servers.
Knowing advanced AJAX concepts is crucial if you want to become a serious fullstack developer, as it will allow you to make asynchronous HTTP requests and listen for incoming data from servers. AJAX can get tricky at times, and I don’t dispute this, but with correct training which includes explaining difficult concepts in a simple way, you will, like me, learn to master and love AJAX.
What is AJAX in one sentence
AJAX allows your users to add/delete/view/update content, post comments, submit reviews, submit forms and a ton more, without getting a page refresh.
Learn the (advanced) secrets of AJAX in this course
Understanding the fundamentals of AJAX is important. That’s why I created the AJAX Fundamentals course. I assume that you have either (1) done my AJAX Fundamentals course, or (2) at the very least you’ve heard of AJAX and know about the XHR object and the Fetch API.
AJAX BEYOND FUNDAMENTALS is important, because it goes beyond the fundamentals of AJAX. It allows you to use AJAX to its fullest to advantage you best. It allows you to master AJAX and take your skills to the next level.
It will equip you to become a highly sought-after programmer.
-
Learn how to send authentication information using the XHR object and the Fetch API
-
Learn how to take user inputs, convert it into JSON data, and send that data to a server
-
Learn how to retrieve XML, JSON and text data from a server
-
Learn how to take data from server and update the page dynamically using JavaScript
-
Learn how to write great code using modules, writing middleware and defining RESTful AJAX APIs, and more!
Delivering an interactive, asynchronous web experience is challenging. In this AJAX BEYOND FUNDAMENTALS course, we take a deep-dive into AJAX. Together, we will tackle questions like: How can you use Basic HTTP Authentication with AJAX? What do you do if you get a CORS issue using AJAX? What happens when an AJAX request reaches a server? What are RESTful APIs and how do you set them up? Answering these questions with confidence will propel you to being confident in AJAX and able to maximize performance.
WHAT THIS COURSE COVERS?
This course is best done if you have at least a little understanding of AJAX.
If you have never heard of AJAX, I encourage you to first do my AJAX Fundamentals course. The reason I have done this is that my AJAX Fundamentals course provides everything you need to start using AJAX yourself. It gives you the sound fundamentals and practicals regarding AJAX. It will take you to the point where you will understand where AJAX came from, how to set up an AJAX request using the XHR object and the modern Fetch API.
My AJAX BEYOND FUNDAMENTALS course picks up on my AJAX Fundamentals course and goes further by digging into topics that are more advanced. My AJAX BEYOND FUNDAMENTALS course will captivate you with real life examples and catapult you to the next level and set you well on your way to achieving everything you want to with AJAX.
What you will learn:
-
Understand how to use the XHR, Fetch API and Axios to make an AJAX request
-
How to set up Basic HTTP Auth using Apache, PHP and Node
-
How to solve CORS issues
-
How to define your own AJAX library
-
How to use Modules (ES Modules and CommonJS modules)
-
How to build an entire application that makes RESTful AJAX requests
-
How to use middleware (like cors(), express.urlencoded() and express.json()) on your server
-
How to set up Routes on your server and send responses back to a browser
-
How to become a better frontend programmer
-
And more!
In my AJAX BEYOND FUNDAMENTALS course you’ll learn, in a simple and fun way, about Basic Auth, CORS, SOP, RESTful services, server routes, middleware, modules, and a ton more!
END GOAL OF THIS COURSE
You will be confident in AJAX and together we build a fully functional site that performs basic CRUD operations and saves data to a server. This simple application will use the power of RESTful AJAX APIs to speak to a server and perform tasks like adding/deleting/updating and viewing data that is stored on your server.
In building this application you will learn the following:
-
Set up a server to store all of your data
-
The server will be set up on a different port number than your frontend code
-
You will have to solve CORS errors
-
Listen for the DOMContentLoaded event to send an AJAX request to populate your table data
-
The users will be able to perform all CRUD operations (create/read/update/delete dog data)
-
All your AJAX code will be written in a module and will be RESTful compliant
-
And a ton more!
How amazing is that?
By the end of this AJAX BEYOND FUNDAMENTALS course, you’ll be able to “speak” and “walk” AJAX by gaining an understanding of how you can use it in meaningful and practical ways. We dig deeper in every lecture, and this course has a lot of additional content that will extend your knowledge base and test your skills.
Through practical examples, I help you understand AJAX piece by piece. And together we use the latest and best features of JavaScript and browsers along the way so you can confidently create what you like using AJAX and stay ahead of the pack.
*** One of the most advanced AJAX courses on Udemy ***
Successful programmers know more than the basics of AJAX. They also know how to solve CORS issues, how to implement authentication and how to set up servers . If you’re wanting to become a full stack developer, you need to know how to send JSON to a server via AJAX (i.e you need to know how to convert your JS objects to JSON), how to define modules and how to use the response data to update the page dynamically. You need to master CORS, and how to allow cross-domain requests, and more! Side by side I take you through all you need to know.
I want you to gain maximum benefit from this AJAX course, and I am here to help
I want you to be able to easily apply what I teach you in this course to any webpage or challenge of your choosing.
If AJAX is your interest, this course is perfect for you my dear student.
How is this course different?
There are lots of great courses that focus on web development. But they never get into the detail about AJAX related issues that will pop up when you start creating more complex sites.
In this AJAX BEYOND FUNDAMENTALS course, I focus on the more advanced topics of AJAX. This includes understanding why the XHR object allowed a username and password field, why you will sometimes want your frontend running a port number that is different to the server port, how to set up a server, how to implement Basic Auth, how to utilize the power of Modules, and more!
Practice makes perfect
Theory is theory … but there’s nothing like the real McCoy and getting behind your computer and typing in good code. That’s why we will be coding, laughing and pulling out our hair together as we code real life websites and exercises during this course. From Section 2 and beyond we start building AJAX projects together.
I love doing practical examples with my students, which is why this course has a number of them. My practical examples offer great lasting benefit to students and that is why I advocate them. My final course project that we will build together is a highlight, it is an application giving a user the ability to add, update, delete and fetch data from a server.
How much fun isn’t that?
Is This Course Right for You?
This course is perfect for anyone interested in enhancing their web development skills. If you find yourself in any of these categories, you’ll benefit greatly from this course:
-
You want to deepen your understanding of asynchronous programming.
-
You’re eager to learn how successful developers build dynamic web applications.
-
You wish to explore advanced concepts like CORS and RESTful APIs.
-
You’re looking for hands-on experience with real-world projects.
WHY START NOW?
The demand for skilled web developers is growing rapidly. By mastering AJAX today, you’ll position yourself ahead of the competition. This course offers memorable learning experiences, actionable insights, and practical examples that will empower you in your development journey.
What do you get?
-
Lifetime access to all tutorial videos.
-
No fees or monthly subscriptions.
-
Q&A support.
-
Quizzes and challenges to help you learn.
-
I’ve allowed you to download all of my lectures for offline viewing.
Let’s get excited about becoming a professional web developer, and to be able to confidently apply it to your own websites.
See you in the lectures.
Let’s get crackin’
-
1IntroductionVídeo Aula
An intro to this section
-
2Can you skip this section?Texto
If you have done my AJAX Fundamentals course, feel free to skip this section
-
3Overview of AJAXVídeo Aula
When you surf the web, what you're really doing is making requests to servers. AJAX allows us to do this in an asynchronous way.
-
4What is AJAX and where did it come from?Vídeo Aula
Many developers starting out get intimidated with AJAX.
But don't worry, it really is not a scary concept.
-
5Is AJAX still relevant today?Texto
While the core principles of AJAX remain unchanged, the landscape of web development is constantly evolving. Frameworks like React, Angular, and Vue have introduced new patterns and best practices for implementing AJAX functionality. Libraries such as Axios and Fetch have also become popular choices for making HTTP requests.Despite these advancements, AJAX remains a fundamental technique that every web developer should understand. It's the backbone of many modern web applications, enabling seamless user experiences and efficient data handling.
-
6Traditional request vs AJAX requestVídeo Aula
In this lecture I want to show you the differences between a traditional synchronous HTTP request versus a modern AJAX request. Pictures speak louder than 1000 words.
Enjoy!
-
7How do you write an AJAX request?Vídeo Aula
To make an AJAX request, you have 2 options:
1. you can use the XMLHttpRequest object
2. you can use the fetch() API
-
8The 2 ways to write an AJAX requestTexto
There are 2 pure ways to make an AJAX request: the Fetch API and using the XMLHttpRequest (XHR) object.
The Fetch API is a newer and more modern way to make AJAX requests. It is a promise-based API, which means that it is easier to use and write code for. The Fetch API is also more flexible than the XHR object, and it supports more features, such as the ability to chain multiple requests together.
The XHR object is an older way to make AJAX requests.
In addition to the Fetch API and the XHR object, there are a number of JavaScript libraries that can be used to make AJAX requests, such as jQuery and Axios.
-
9AJAX recapQuestionário
FIRST SECTION NAILED!
Back in the old days, when I was growing up, websites returned complete web pages when you visited a page. To reload any data, you had to reload the entire page.
This was an inefficient way of serving information to users and wasn't good for user experience. It also increased the load on servers and the bandwidth needed to serve data.
Something had to change.
Microsoft created the ActiveXObject, and in the early 2000's Google added functionality to Gmail that allowed data to be fetched in the background. They did the same thing for Google Maps.
Both Google's and Microsoft's techniques allowed developers to fetch data from a web server using JavaScript without a page reload.
This is AJAX.
Try your hand at these few questions.
Have fun, and I'll see you in the next section.
-
10Introduction - what are we going to buildVídeo Aula
An intro to what we're going to build together.
-
11Setting up the HTMLVídeo Aula
It's time to set up our first mini project.
In this lecture i'll tell you a little about VSC, why I use Live Server and also set up the HTML. -
12Writing the CSSVídeo Aula
In this lecture we will turn our ugly ducking into a beautiful swan, by using CSS.
-
13XHR AJAX - fetching text from our serverVídeo Aula
For the first time in this course, I want you to now use the XMLHttpRequest() object to fetch a .txt file, wait for a response, and then display that text on your HTML page.
-
14XHR AJAX - refactoring code and adding HTML to the DOMVídeo Aula
In this lecture I will show you how to add HTML to the DOM dynamically, and I also want to refactor our code slightly to have our main business logic outside of the AJAX onload callback.
-
15XHR AJAX - fetching JSON from our serverVídeo Aula
We've dealt with text data.
Now its time to recap how you can work with JSON data received from a server.
-
16The responseType propertyVídeo Aula
The responseType property allows you to (a) define the expected response type you receive back from the server and (b) convert whatever format is received from the server into your desired format.
But, do you think it works with JSON? The answer may surprise you.
-
17Third party APIVídeo Aula
In this lecture I'll show you what third party API we will be using, so you can attempt to write the fetch request by yourself.
Good luck.
-
18XHR AJAX - fetching JSON from a third party APIVídeo Aula
Let's finish off our XHR example by grabbing data from a third party API.
-
19Fetch AJAX - retrieving text from our own serverVídeo Aula
Let's now refactor our XHR request into the modern Fetch API.
First we will perform a Fetch request to get / retrieve the contents of our internal text file.
-
20Fetch AJAX - retrieving JSON from our server and third party APIVídeo Aula
It's time to finish off this entire example by completing our Fetch request to get JSON data.
-
21AJAX fundamentals quizQuestionário
NICE WORK, COMRADE!
In this section you have built a mini app with 3 buttons
1. GET text
2. GET JSON
3. GET API Data
Yes, it was rather basic.
We first used the XMLHttpRequest() object, and then refactored the code to use the modern Fetch API.
This project was a recap. It should have reminded you of some important skills that you'll need for the rest of this course.
Give this quiz a shot, and in the next section we'll tackle a simple, but slightly more advanced, example.
I can't wait.
-
22Section introVídeo Aula
A quick intro to this section
-
23What are we going to buildVídeo Aula
We are going to build a simple input field where a user types in a food item, and that items is sent to the server, and the server determines whether it is available. The appropriate message is then sent back to the client.
We will:
1. create this example using a PHP server; and
2. create this example using a Node.js backend server
-
24Write our HTMLVídeo Aula
In this lecture I want us to build our HTML file.
-
25Setting up our AJAX requestVídeo Aula
We will approach this project in steps.
The first logical step is to grab what the user has typed in the <input> element, and then send this to the server.
In our example we are sending the data to a PHP server. Luckily for us, PHP has a superglobal $_GET method which makes it easy for us (on the server) to grab a query string.
That is why in this example we will insert the user input into the URL as a query parameter.
-
26URL and query parametersVídeo Aula
I want to finish off with completing our URL. You need to understand that when using a GET request, the data sent to the server will be done in key:value pairs. In other words, the data will be sent as a query string.
-
27Quick wordTexto
A quick word before you continue
-
28Writing our PHP server side codeVídeo Aula
This course is not about server side code.
However, I think its important that you understand how AJAX is used on the server side to grab data, process it, and send something back to the browser.
-
29How to access XML data returned by the serverVídeo Aula
Usually when working with the XHR object we have to access data from the xhr.responseText property.
But things are different when we start working with XML.
-
30Retrieving data from the PHP server, and inserting it into the DOMVídeo Aula
I want to show you how you can retrieve the data received from our PHP server and display it into the <div> tag.
-
31Finishing off our PHP server exampleVídeo Aula
It's time to finish off our entire PHP / AJAX example.
-
32Setting up Node and sending a responseVídeo Aula
In the previous lecture we finished off our PHP example.
It is now time to set up our Node server. In order to set up a server, we'll have to import the HTTP module. I will then show you how to define custom headers, and then send a response to a browser.
-
33Node ModulesTexto
It can be daunting when first seeing a node.js file and coming across the concept of Modules.
But don't worry, let me break it down for you.
-
34Reading a Node text responseVídeo Aula
We have set up our Node server (using the HTTP module) but at this point we have not received the data from the browser.
-
35Difference between xhr.response and xhr.responseTextTexto
Difference between xhr.responseText and xhr.response
-
36Completing our Node exampleVídeo Aula
In this lecture we will finish off our Node example to completion.
-
37Server side AJAXQuestionário
YOU'RE BECOMING A PRO!
In this section, we created 2 variations of the same example.
Specifically:
1. we set up a PHP server on port 8000, and served our HTML file on the same port => no CORS policy required
2. we set up a Node server on port 8001, and served our HTML file on another port -> CORS policy was required
We set up custom headers in each example, and sent back appropriate responses.
Pretty cool huh?
But don't get lost in all of the detail.
AJAX is really a front-end concept, and this means you don't need to understand server side code in order to master AJAX. However, understanding how servers pick up AJAX data is an important skill and puts a (rather large) feather in your cap.
I can't wait for the next section.
-
38Introduction to authenticationVídeo Aula
Don't get lost in the detail.
The original AJAX object had the ability to pass in user credentials (username and password). This was done to utilize the HTTP Basic Authentication scheme.
This is precisely why I want you to understand the Basic Authentication Scheme.
-
39AuthenticationTexto
It can be difficult to wrap your head around the concept of the Authentication. Hopefully this short article will help.
-
40Basic HTTP Auth in actionVídeo Aula
I want to show you how you can use the browser and also the command prompt (the CURL) to see HTTP request header information.
I will then show you a high level overview of how Basic HTTP Auth is working.
-
41HTTP Basic AuthTexto
Don't get lost in all of the detail
-
42How Basic Authentication works and why are we discussing it in this courseVídeo Aula
If you will recall from my AJAX Fundamentals course, the XHR.open() method takes 5 arguments, the last 2 of which are username and password.
The reason the open() method took these arguments was to make your life easier if you wanted to utilize HTTP Basic Auth.
-
43Base64 encoding vs encryptionVídeo Aula
If anyone can decode the base64 username and password, then what is its purpose?
Is base64 the same as encryption?
Let's dive into it.
-
44Basic Authentication compared to traditional HTTP requestsVídeo Aula
It wasn't until 1996 that the concept of authentication was introduced into the HTTP protocol. Before this, the internet was only public. You could not have private URLs.
-
45What is ApacheVídeo Aula
Apache is a web server. It is one of the mostly used web-servers today (some sites I've seen say that Apache is being run on over 70% of websites today).
-
46Strike the right balanceVídeo Aula
This course is about AJAX.
But to really understand AJAX, you need to understand why the XHR object had the option for passing in a username and password.
But in order to understand this, you need to understand Basic Authentication.
And in order to understand Basic Authentication, you need to understand a little about server side code.
-
47How to start an Apache serverVídeo Aula
I know this may sound obvious, but in order to use or "run" a server on your own machine, you need to download it first.
For this, the most easy way is to install XAMPP.
From there, you have a few options in how you want to start the server. You can start it from the command prompt, and you can also start it from the XAMPP interface directly.
-
48Setting up our Apache server and .htaccess fileVídeo Aula
In this lecture I want to show you how to start an Apache server and server your first index.html file. I will also set up a config file for our root directory in a file called .htaccess.
-
49Purpose of the .htaccess fileTexto
Take a quick break, and don't forget what the .htaccess file is all about
-
50Adding Basic Authentication in ApacheVídeo Aula
You have to configure what type of authentication you are implementing on the server.
I will show you how this can easily be done with Apache.
-
51The .htaccess file does not have logout functionalityTexto
By default the .htaccess file does not have any concept of sessions or logout functionality. This means once the correct user credentials have been entered, they will be saved in the browsers cache.
-
52What is the use of the .htpasswd file?Texto
Wrapping your head around why the .htpasswd file exists is difficult.
I've been there.
That is why I've written this short page to help you understand why it is used.
-
53What are we going to build?Vídeo Aula
This the project intro.
I want to build a simple HTML form where the user types a username and password and clicks on a button that will reveal the secret message.
We will use Basic Auth and AJAX to perform this request and authenticate the user.
-
54Building the HTMLVídeo Aula
I want to build a simple HTML form.
I will add an inline event listener to the form, listening for the "submit" event. When this event is fired, we will execute a function that will use AJAX to take the user input and send it to the server.
-
55The preventDefault methodVídeo Aula
The default behaviour of a "submit" event inside of a <form> element is to refresh the entire page.
We don't want this.
Therefore, we can use the preventDefault() method. This method cancels the event if it is cancelable, meaning that the default action that belongs to the event (in our case, the page refresh) will not occur.
-
56More on preventDefaultTexto
The preventDefault() method is give to you on the Event interface by the browser. It's pretty powerful.
-
57Using the window.event keywordTexto
In the previous lecture I showed you 2 ways of accessing the Event object. Which one is best? Read this short article to find out.
-
58Sending user credentials with AJAX, with custom base64 encodingVídeo Aula
It's now time to finish off this example by using the XHR object to send the user credentials alongside a request to access the file protected secret.html file.
-
59How to prevent the browser popupTexto
The browser displays you a popup asking for a username and password when you try and use Basic Auth.
Is there a way to stop this from happening?
Let's find out.
-
60Using XHR for Basic AuthenticationVídeo Aula
The entire purpose of this section was to get you to this point - to understand that the original AJAX object allowed you to pass in a username and password, and AJAX would set all the required headers in the background.
-
61Creating a custom error message in ApacheVídeo Aula
If the user types incorrect user credentials, and hits cancel on the popup, we get sent back a generic Unauthorized Access message from Apache.
In this lecture I want to show you how you can send back a custom error message instead.
-
62Updating our code to the modern Fetch APIVídeo Aula
Today we typically use the Fetch API to perform AJAX requests. So this exercise would not be complete if I did not show you how to quickly convert our XHR object into a Fetch request.
-
63Next example is using NodeTexto
In the previous example we used an Apache server to serve files to the browser.
In the next few lectures I want to show you how you can set up a Node server to do the same thing.
-
64Node example - what are we going to build?Vídeo Aula
I don't want to concentrate on AJAX in this example. Rather, I want to introduce you to routes and how you can handle them on Node server.
-
65What is a node serverVídeo Aula
In the previous example we used an Apache server to serve files to the browser.
In the next few lectures I want to show you how you can set up a Node server to do the same thing.
-
66How to install NodeTexto
If you want to code alongside me, you'll have to have Node installed on your machine.
-
67How to install ExpressTexto
In the upcoming lectures I will be using Express to help create routes.
Express is not a core module in Node, meaning that we have to install it separately.
There are 2 ways you can install Express: locally or globally. I will show you how to do both.
-
68Setting up our Node serverVídeo Aula
Remember, Node itself is a JavaScript environment. What I mean by this is that it is BIG. It can do different things like execute JavaScript, read files, etc. One of the things it can also do is set up an internal server.
In this lecture I want to show you how to set up a Node.js server. You can do this in one of 2 ways:
use the HTTP module; or
use an express app
I will show you both ways.
-
69How to set up a server in Node.jsTexto
The easiest way to set up a server in Node is to use Express. The reason why its easier is that Express also gives us the ability to create and define URL routes, very easily.
However, if your site is simple, you can just as easily use the HTTP module to create your server. The benefit with using the HTTP module is that you dont have to install it because it comes shipped with Node.
-
70Where does Node look for modules?Texto
You may be curious how Node knows where and how to find a module that you require.
In our example we told Node that we want to use the express framework. Remember, our code looked like this: let express = require('express');
In this article I'll explain how node finds this framework on your machine.
-
71Checking whether the Authorization header existsVídeo Aula
The first step in implementing authorization to a webpage is for the server to tell the browser that it requires authentication.
In this lecture I want to show you how you can set this up on your server.
-
72Extract user credentials using BufferVídeo Aula
In this lecture I want to show you how you can extract grab the "Basic base64_string" containing the user credentials and then return the username and password in separate variables.
In order to do this, we need to use the Buffer.from() method, given to us by Node.
Remember what it is that we're trying to achieve.
we want to grab the username and place it in a variable
we want to grab the password and place it in a variable
we then want to compare whether these values match our system
-
73No server side language is perfectVídeo Aula
In the previous lecture I used the Buffer.from() method, but if this is all I did then we would have a list of integers that are meaningless to us.
This is why I had to then use the toString() method to convert the buffer into a readable string.
-
74Finishing off our Node exampleVídeo Aula
Finally! In this lecture we will finish off our Node example of adding authentication to our /secret URL.
-
75Basic Auth as a security measureTexto
Basic Auth is not great when it comes to security.
-
76The next() function has a dual purposeTexto
In the previous lecture we used the next() function a few times. Sometimes, we passed in an error object. Sometimes, we passed in nothing.
-
77The next() function stops middlewareVídeo Aula
In the previous video I went fast, and in doing so I missed a few errors.
So, in this lecture I want to explain more about the next() function and how you can use it. I also want to tidy up our code and improve the way it flows.
-
78More about the next() functionVídeo Aula
There are a few more important points I want you to understand about the next() function.
-
79Spotted an errorVídeo Aula
We have a slight issue here, because if the user types in the incorrect credentials we are redirecting the user to the /error page.
Only after we redirect the user here do we set the WWW-Authenticate header and the status code of 401. This will have the effect of telling the browser that we require user credentials to enter the /error page, when in fact we still want the request to be to /secret.
Let me show you how to fix this.
-
80Basic Authentication - Section SummaryVídeo Aula
This course is about AJAX, so why did I then spend an entire section explaining how Basic Authentication works?
It boils down to you really having a deep understanding on how the original XMLHttpRequest() object worked.
-
81Section outroVídeo Aula
We've covered a lot in this section.
Well done.
-
82Authentication QuizQuestionário
W00T W00T!
A user's initial request to a URL is usually anonymous (think about when you land on a random webpage), so it doesn’t have any information to confirm that the user is who they say they are.
Sometimes this is fine.
But the flip side is that this can be dangerous if the URL contains sensitive data.
This is where authentication comes into the picture.
To filter user access, the server first denies the anonymous request and indicates that client authentication is required (it does this via the WWW-Authenticate header).
Usually, authentication by a server entails the use of a username and password.
HTTP supports the use of several authentication mechanisms. In this section we looked at one of the most common methods of authentication that HTTP gives us.
Before you continue to the next section, try these fun questions.
Smile.