From the course: JavaScript: Ajax and Fetch
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
View requests and responses in the browser - JavaScript Tutorial
From the course: JavaScript: Ajax and Fetch
View requests and responses in the browser
- [Instructor] When you're working with Ajax requests, it can be useful to examine the actual HTTP request and response headers that are being sent when your code is executed. Modern browser developer tools let you record and review network activity including each HTTP request for the current page. Both Chrome and Firefox dev tools include a network tab. I'm using Chrome so I'll open the dev tools and then I'm going to click network and notice that this list is empty. Browsers want to avoid doing a bunch of work in the background and they want to avoid saving information that takes up memory but that may never be viewed. So dev tools generally don't log network requests until you open the tab. With the tab open, I can go back and reload the page and now I see all the requests logged for this page including the CSS and JS files, fonts, images, and down here is my Ajax request for parks info. So on my screen this is third from the bottom, starts with the word parks followed by a…
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.
Contents
-
-
-
-
-
-
(Locked)
Structure Ajax requests for performance2m 49s
-
(Locked)
View requests and responses in the browser3m 21s
-
(Locked)
Work with authorization errors2m 56s
-
(Locked)
Work with malformed requests5m 15s
-
(Locked)
Work with errors in Fetch4m 44s
-
(Locked)
Provide error fallbacks7m 15s
-
(Locked)
Challenge: Fix an Ajax request49s
-
(Locked)
Solution: Fix an Ajax request4m 29s
-
(Locked)
-
-