diff --git a/HTTP1.1 vs HTTP2 b/HTTP1.1 vs HTTP2 new file mode 100644 index 00000000..1b97cce7 --- /dev/null +++ b/HTTP1.1 vs HTTP2 @@ -0,0 +1,18 @@ +HTTP1.1 +The first usable version of HTTP was created in 1997. Because it went through several stages of development, this first version of HTTP was called HTTP1.1. This version is still in use on the web. + +In the context of web performance, prioritization refers to the order in which pieces of content are loaded + +HTTP2 +In 2015, a new version of HTTP called HTTP2 was created. HTTP2 solves several problems that the creators of HTTP1.1 did not anticipate. In particular, HTTP2 is much faster and more efficient than HTTP1.1. One of the ways in which HTTP2 is faster is in how it prioritizes content during the loading process. + +In HTTP2, developers have hands-on, detailed control over prioritization. This allows them to maximize perceived and actual page load speed to a degree that was not possible in HTTP1.1. + +Differences between HTTP1.1 and HTTP2 + +Multiplexing: HTTP/1.1 loads resources one after the other, so if one resource cannot be loaded, it blocks all the other resources behind it. In contrast, HTTP/2 is able to use a single TCP connection to send multiple streams of data at once so that no one resource blocks any other resource + +SERVER PUSH: Typically, a server only serves content to a client device if the client asks for it. However, this approach is not always practical for modern webpages, which often involve several dozen separate resources that the client must request. HTTP/2 solves this problem by allowing a server to "push" content to a client before the client asks for it. The server also sends a message letting the client know what pushed content to expect – like if Bob had sent Alice a Table of Contents of his novel before sending the whole thing. + +HEADER CPMPRESSION : Small files load more quickly than large ones. To speed up web performance, both HTTP/1.1 and HTTP/2 compress HTTP messages to make them smaller. However, HTTP/2 uses a more advanced compression method called HPACK that eliminates redundant information in HTTP header packets. This eliminates a few bytes from every HTTP packet. Given the volume of HTTP packets involved in loading even a single webpage, those bytes add up quickly, resulting in faster loading. + diff --git a/OBJECT b/OBJECT new file mode 100644 index 00000000..ba4f64c1 --- /dev/null +++ b/OBJECT @@ -0,0 +1,16 @@ +Objects are important data types in javascript. Objects are different than primitive datatypes (i.e. number, string, boolean, etc.). Primitive data types contain one value but Objects can hold many values in form of Key: value pair. These keys can be variables or functions and are called properties and methods, respectively, in the context of an object. + +Every object has some property associated with some value. These values can be accessed using these properties associated with them. + +The syntax for adding a property to an object is: +ObjectName.ObjectProperty = propertyValue; + +The syntax for deleting a property from an object is: +delete ObjectName.ObjectProperty; + +The syntax to access a property from an object is: +objectName.property + //or +objectName["property”] + //or +objectName[expression] \ No newline at end of file