html CSS
pc
h5 new attributes
Highlights
websocket
web woker
service woker
Box model
Highlights
Weird box model
Standards and models
Responsive layout
Highlights
Implement the grid system yourself
Viewport
BFC
Mobile
300ms delay
How to adapt to different mobile phones
1 pixel
Flexbox
JS
ES5
prototype
Prototype chain
Object-oriented
Closure
Closure
Scope
this points to
ES6
New features
Array common methods
promise
asynchronous
Macro task micro task
Concurrent
How to implement a multi-concurrency operation
Give two interfaces'/api''/user', ask how to use concurrency to realize data return, and enable both interfaces at the same time
async awalt
Asynchronous solution
promise.then implementation
TypeScript
sass
What is sass
The difference between sass and css
The difference between sass and less
Hybrid macro
function
ajax
The difference between fetch and xmlhttprequest (that is, ajax)
Same Origin Strategy
Cross-domain
What happened to the request
Redirect
At first it will redirect. For example, if you call baidu.com, it will eventually redirect this to www.baidu.com, which means that some URLs have their own redirects, and they don’t get the data directly after the redirects. , There are many processes in the middle;
Fetch from cache
The most common status code fetched in the cache is a status code of 304 (local redirection), 301 (temporary redirection), 302 (permanent redirection);
Caching strategy:
dns resolution
It will detect which server it belongs to according to an IP address. Each ip address and each URL have a corresponding server, and a server may correspond to multiple ip addresses, so here it has a server domain name resolution, resolution After it is finished, it will find the IP address of the corresponding server, and after finding the IP address, it will send out the corresponding request based on this IP address. For example, if you open a web site, it will have Remote Address: IP address in its Headers. After the IP address is resolved, the server corresponding to the IP address can be accessed. This is dns resolution. Direct access is definitely not accessible.
In addition to caching, as long as it has to establish a connection
Establish a three-way handshake for tcp
Some things happening at the bottom of the tcp protocol:
The network protocol is divided into 5 layers:
application layer : http, https, ftp (using this ftp to transfer files) (to send data to the server you must first write some code ajax is the application layer);
protocol layer (a package for this thing, also That is to say, the outer layer of the data sent is wrapped with something called a socket, which will be sent to the following layer when the package is late): tcp (establish a long connection [always keep the link]), udp;
Network layer : In the computer, there is a network manager, network adapter, etc., that is, you can set IP or something; that is to say, the computer exposes to you several software packages or several operational interfaces, which you can control This network layer is to let it establish a connection or not;
data link layer : it is equivalent to this thing, it has to connect some hardware or something: network card (a semi-hardware facility, sending data to the network card, the network card is transmitting to the wifi , Network cable);
physical layer : wifi, network cable;
There will be a three-way handshake in the middle. The three-way handshake is not something you can control. The only thing that can be controlled is the application layer. The application layer can send this to the tcp protocol in your computer;
The difference between tcp and udp:
tcp : establishing a connection requires three-way handshake, ensure data security, is facing a long connection; ( tcp
safer, data integrity is higher, because it has a full packet will not cause data loss.);
tcp
the Application field: generally use tcp when dealing with data;
udp : it is connectionless, no three-way handshake is required to establish a connection; (the security is not high, the data is relatively incomplete);
udp
the application field: (for example, transmission It’s okay if the transmission is lost; when watching a live broadcast, occasionally a snowflake is made, which has little effect.) When watching videos and transmitting some live broadcasts, udp is used, because it is fast and it does not need to establish a connection.
Some udp formed protocols: mqtt, xmpp (compared to udp with some encapsulation) [they are more suitable for processing video and live broadcast protocols like this];
Response data
After responding to the data, you can point out the data through res. because it has already responded;
Probably that's it
That's all I know.