This is a very powerful ability that all of our favorite social media sites use. When Instagram, Twitter, or Facebook timeline updates live just remember that is AJAX at work.
Some common methods and functions of XMLHttpRequest are open(), send(), & readyState. Open() specifies the request whether it’s a method, url, async, user, and psw. Send() sends the request to the server used for GET requests and send(string) is used for the POST requests. GET is simpler and faster than POST. However POST requests have no size limit and are more secure.
It is exciting to see how everything is correlating together and making sense of how websites function nowadays especially social media sites.