Cookie vs Session
Excerpt from: cookie/session mechanism explanation
Common session tracking techniques are cookies and sessions.
1. Cookies determine the user identity by logging information on the client, session by recording information on the server side.
2. Cookies
A cookie is actually a small piece of text information. The client requests the server and, if the server needs to log the user state, uses response to issue a cookie to the client browser. The client browser will save the cookie. When the browser requests the site again, the browser submits the requested URL along with the cookie to the server. The server checks the cookie to identify the user state. The server can also modify the contents of the cookie as needed.
The cookie object saves the user state in the form of a Key-value property pair, a cookie object that holds a Key-value pair, a request or response using multiple cookies simultaneously.
Cookies have non-cross-domain names. That is, Google only carries Google's cookies, and does not carry Baidu's cookies. Similarly, Google can only manipulate Google's cookies.
Limitations: The cookie feature requires browser support. If the browser does not support cookies or if the cookie is prohibited, the cookie function will expire.
3. Session
Session is a server-side use of the mechanism to record client status, the use of more than a cookie is simpler, the corresponding increase the storage pressure of the server.
When the client browser accesses the server, the server logs the client information to the server in some way. This is the session. When the client browser accesses it again, it only needs to find the customer's status from that session.
URI vs URL vs URN
Uri,uniform resource Identifier, a Uniform resource identifier, used to uniquely identify a resource.
Url,uniform Resource Locator, a unified resource Locator, is a specific URI that the URL can use to identify a resource, and also how to locate the resource. Like an address, it tells you a way to look for a goal. For example: http://bitpoetry.io/posts/hello.html
Urn,uniform resource Name, Uniform Resource naming, is a name that identifies a resource. An ISBN code similar to a book. Although there is no telling you how or where to look for a goal, you have enough information to retrieve it. For example: Bitpoetry.io/posts/hello.html#intro
That is, URIs define uniform resource identities in an abstract, high-level concept, whereas URLs and urns are specific resource identities. URLs and urns are all a kind of URI.
HTTP 1.0 vs HTTP 1.1
HTTP 1.0: Each request of the browser requires a separate connection, and automatically releases the connection after each request has been processed.
HTTP 1.1: Multiple requests can be processed in a single connection, and multiple requests can overlap, without waiting for a request to end before sending the next request.
Tcp / ip
Reference: OSI layer Seven and TCP/IP layer five network architecture
Learn about TCP/IP, find a Super Good Learning Blog collection: TCP/IP Detailed learning notes
Application Layer
Protocol: Telnet, FTP, SMTP, SNMP, DNS, HTTP
Transport Layer
Protocol: TCP, UDP, UGP
Network layer
Protocol: Internet Protocol IP, Address Resolution Protocol ARP, inter-network Control Message Protocol ICMP, Interconnect Group Management Protocol IGMP
Devices: Layer three switches, routers
Link Layer
Protocol: ARP, RARP, PPP, MTU
Equipment: Network card, bridge, second layer switch
Physical Layer
Device: Repeater (repeater), Hub (hub)
Network-related concept notes