Codesmith programming: what are the technical points when learning Web front-end development

There are more and more people learning the front-end, and the quality of learning is also uneven. The identity of the person who came here tells you that if you have not made up your mind to spend time learning web front-end, you can also find some videos to learn about the common technical points of web front-end development! Next, let’s take a look at what are common in web front-end development Technical point!

1. What are your performance optimization methods?

(1) Reduce the number of http requests: CSSSprites, JS, CSS source code compression, image size control is appropriate; web page Gzip, CDN hosting, data caching, image server.

(2) The front-end template JS+ data reduces the bandwidth waste caused by HTML tags. The front-end uses variables to save the AJAX request results. Every time you manipulate local variables, you do not need to request to reduce the number of requests.

(3) Use innerHTML instead of DOM operations to reduce the number of DOM operations and optimize javascript performance.

(4) When there are many styles to be set, set the className instead of directly operating the style.

(5) Use less global variables and cache the results of DOM node search. Reduce IO read operations.

(6) Avoid using CSSExpression (css expression), also known as Dynamicproperties (dynamic properties).

(7) Picture pre-loading, put the style sheet at the top, put the script at the bottom with a timestamp.

2. What is graceful degradation?

Graceful degradation: Web sites work normally in all modern browsers. If the user is using an old browser, the code will check to make sure they work properly. Due to IE's unique box model layout problem, the hacks for different versions of IE have been gracefully degraded, adding candidates for browsers that cannot support functions, so that they can be degraded in some form on the old browsers, but they will not be degraded. Completely failed.

3. What is progressive enhancement

Progressive enhancement: Starting from the basic functions supported by all browsers, gradually adding those only supported by modern browsers, and adding additional styles and functions that are harmless to the basic browser to the page. When supported by the browser, they will automatically appear and function.

In fact, for a technical position such as the web front-end, more practical project experience is required than the theory on paper.

Guess you like

Origin blog.csdn.net/ZYDX18984003806/article/details/103700870