Giter Site home page Giter Site logo

Comments (3)

zhangjun620 avatar zhangjun620 commented on August 10, 2024

2.模块化
在面对对象编程里叫做单一职责原则,一个模块只负责一个功能。

from font-end-tips.

zhangjun620 avatar zhangjun620 commented on August 10, 2024

3.页面卡顿解决方案

from font-end-tips.

zhangjun620 avatar zhangjun620 commented on August 10, 2024

4.页面打开速度增强

避免head标签JS堵塞

1.所有放在head标签里的CSS和JS都会堵塞渲染,如果这些CSS和JS需要很久时间加载和解析,那么页面就空白了。

方法: 常用的就是放在body后面,第二个就是给script增加defer属性来延迟加载,这是HTML5新属性,有了这个属性就变成异步加载了我写的script不同属性加载顺序图)

2.不要放太多base64在css里面

3.使用响应式图片

from font-end-tips.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.