2020-08-12 Multilingual html page + css loading of css + js blocking of JS + pixel tracking of soft skills

2020-08-12 Source of topic: http://www.h-camel.com/index.html

[html] The page needs to support multiple languages, if so, what should you do?

Unified encoding using utf-8

See the implementation plan here: https://blog.csdn.net/xujie_0311/article/details/42047407

[css] Will css loading block DOM tree parsing?

CSS is regarded as a resource that blocks rendering.

The loading of css will not block the parsing of the DOM tree, but it will block the rendering of the DOM tree; it will not block the download of js, but it will block the execution of js.

Improve user experience: CND hosting; css compression; reasonable use of cache;

[js] Under what circumstances will js block?

1. CSS blocking: When css is followed by embedded js, the css will not block the download of the following resources, but will block the execution. Need to put embedded js in front of css to not block.

The root cause: the browser will maintain the order of css and js in the html, the style sheet must be loaded and parsed before the embedded js is executed, and the embedded js will block the subsequent resource loading, which shows that it is css blocking.

2. JS blocking: Embedded js will block the presentation of all content, while external js will block the display of the following content.

So, put the script at the bottom. <link>还是放在head中,用以保证在js加载前,能加载出正常显示的页面。<script>标签放在</body>前.

Reference article: https://www.cnblogs.com/bibiafa/p/9364986.html

[Soft Skill] Do you know what pixel tracking is? What is it used for? How does it work?

Pixel tracking technology (TrackingPixel, 1×1 pixel small picture, mainly used to track the number of users visiting the website or view the effect of advertising), or web beacons are small pictures (1×1 pixels).

See here for details https://zhuanlan.zhihu.com/p/99998315

Guess you like

Origin blog.csdn.net/vampire10086/article/details/108460907