Summary of front-end specifications

Summary of front-end specifications:  

  1. All submission buttons must be protected against repeated submissions (write instructions, assign variables, the interface does not return the button unchanged, and the control is disabled).
  2. New pages or components are stored in a unified manner according to functional modules. The corresponding functional code must be clearly commented, why it is added, how to reuse it, etc., to facilitate subsequent maintenance and iteration by developers.
  3. Unified encapsulation of routing, authentication, requests, hidden points, and error reporting tools to facilitate unified monitoring. When doing local commits, unify the code format and allocate more than three branches to the project. The main branches should have two branches (develop, master), one for testing and one for officially launching the stable version. When asking It is convenient for version backtracking when there is a problem.
  4. Bugs are cleared on a daily or weekly basis to ensure the normal progress of the testing work and reduce the occurrence of production problems. Follow the retesting and bug regression of test classmates, and arrange for classmates to perform follow-up maintenance.

  1. CSS sprite (Sprite image) uses this method to merge several images into one, and then cut out the corresponding image through the container. This method is particularly good. It can often turn more than ten image requests into one, with an optimization rate of more than 1000%. It can be said to be the ultimate skill. Learn it quickly.
  2. Lazy loading of images means that only the images on the first screen are loaded, and the parts that have not yet been browsed are not loaded until you swipe to see them. This optimization technique is particularly common. Taobao, Meituan, etc. all use this optimization. It greatly speeds up the loading speed of the first screen and improves the user experience. lazy load website: HYPERLINK https://www.lazyloadjs.cn/ https://www.lazyloadjs.cn/
  3. Put CSS in the head and js at the end. JS and DOM page rendering share a common thread. If you put js in the front, it may block the rendering of the page, causing the DOM to not be rendered (long white screen time), user experience Extremely poor.
  4. css compression tool, link: https://c.runoob.com/front-end

 

 

Feel free to add~

If it helps you, can you give me a little heart~

Guess you like

Origin blog.csdn.net/weixin_38791717/article/details/110223932