Everest front-end architect training plan

1. The front end needs to pay attention to which SEO
reasonable title, description, keywords: search for the weight of the three items to reduce one by one, the title value can emphasize the key point, and the important keywords should not appear more than twice, and should be higher, different page titles It must be different; description should be a high-level summary of the page content, the length is appropriate, and the keywords should not be overly piled. The description of different pages is different; keywords can list important keywords to
semantic HTML code, which conforms to the W3C specification: semantic code allows Search engines are easy to understand webpages.
Important content HTML code is placed first: search engines crawl HTML from top to bottom. Some search engines have limitations on the crawl length to ensure that important content will be crawled.
Important content should not be output with js : Crawlers will not execute js to obtain content
. Use less iframe: search engines will not crawl the content in iframes.
Non-decorative images must be added with alt to
improve website speed: website speed is an important indicator of search engine ranking.
2. The title and alt are available What is the difference?
Usually when the mouse slides on the element, the
unique attribute of alt is displayed , which is the equivalent description of the image content, which is used when the image cannot be loaded and the screen reader reads the image. It can improve the high accessibility of pictures, except for purely decorative pictures, meaningful values ​​must be set, and search engines will focus on analysis.
3. Uses of several HTTP request methods
1. GET method

Send a request to get a certain resource on the server
2. POST method

Submit data or attach new data to the resource specified by URL
3. PUT method

It is similar to the POST method, but also wants the server to submit data. However, there are differences between them. PUT specifies the location of the resource on the server, and POST does not have a
4, HEAD method

Only request the first part of the page
5. DELETE method

Delete a resource on the server
6. OPTIONS method

It is used to obtain the methods supported by the current URL. If the request is successful, there will be an Allow header containing information like "GET, POST"
7. TRACE method

The TRACE method is used to stimulate a remote, application layer request message loop
8. CONNECT method

Convert the request connection to a transparent TCP/IP channel
4. Steps to enter the URL from the browser address bar to the displayed page The
browser passes the requested URL to DNS domain name resolution, finds the real IP, and initiates a request to the server; the
server hands it to the background After the processing is completed, the data is returned, and the browser receives files (HTML, JS, CSS, images, etc.); the
browser parses the loaded resources (HTML, JS, CSS, etc.) and establishes the corresponding internal data structure (such as HTML) DOM);
load the parsed resource file, render the page, and finish.
5. How to optimize website performance and
content

Reduce HTTP requests: merge files, CSS sprites, inline Image,
reduce DNS queries: DNS cache, distribute resources to the appropriate number of hostnames,
reduce the number of DOM elements in
Server

Use CDN to
configure ETag
to compress
cookies using Gzip for components

Reduce cookie size
css aspect

Put the style sheet at the top of the page
Do not use CSS expressions
Do not use @import
Javascript aspects

Put the script at the bottom of
the page Import javascript and css from the outside
Compress javascript and css
delete unnecessary scripts
Reduce DOM access
Image aspect

Optimize the picture: choose the color depth and compress according to the actual color.
Optimize the css wizard.
Do not stretch the picture in HTML.
6. HTTP status code and its meaning
1XX: Information status code
100 Continue Continue. Generally, when sending a post request, http has been sent After the header, the server will return this message to indicate confirmation, and then send the specific parameter information
2XX: success status code
200 OK normally returns the message
201 Created request succeeded and the server created a new resource
202 Accepted The server has accepted the request, but has not yet processed
3XX: Redirect
301 Moved Permanently The requested webpage has been permanently moved to a new location.
302 Found temporary redirection.
303 See Other Temporary redirection, and always use GET to request a new URI.
304 Not Modified Since the last request, the requested webpage has not been modified.
4XX: Client error
400 Bad Request The server cannot understand the format of the request, and the client should not try to initiate a request with the same content again.
401 Unauthorized The request is not authorized.
403 Forbidden access is forbidden.
404 Not Found Can not find how to match the resource with the URI.
5XX: Server Error
500 Internal Server Error The most common server-side error.
503 Service Unavailable The server is temporarily unable to process the request (may be overloaded or maintained).

Guess you like

Origin blog.csdn.net/weixin_52772147/article/details/112135531