JavaScript AJAX Flashcards

1
Q

What is AJAX?

A

A programming practice of building complex, dynamic webpages using a technology known as XMLHttpRequest
Allows you to update parts of the DOM of an HTML page instead without the need for a full page refresh.
Also lets you work asynchronously, meaning your code continues to run while the targeted part of your web page is trying to reload (compared to synchronously, which blocks your code from running until that part of your page is done reloading)
TEXTBOOK: a technique for loading data into part of a page without having to refresh the entire page. The data is often sent in a format called JavaScript Object Notation (or JSON). Or HTML, XML (?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the AJAX acronym stand for?

A

Asynchronous JavaScript And XML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which object is built into the browser for making HTTP requests in JavaScript?

A

XMLHttpRequest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?

A

‘load’ event

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Bonus Question: An XMLHttpRequest object has an addEventListener() method just like DOM elements.
How is it possible that they both share this functionality?

A

They have a shared object in their prototypal chain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly