当前位置:网站首页>[learning notes] possible reasons and optimization methods for white screen on Web pages
[learning notes] possible reasons and optimization methods for white screen on Web pages
2022-07-24 06:51:00 【Father Zeng Pang】
Problem description
Page white screen , The details are as follows 
The main reason for page white screen is that page rendering is blocked
The reason why rendering is blocked
Probably because CSS Loading is blocked , And then because of CSS stay headb tag , As a result, only after loading CSS, To display the content , However CSS Loading is blocked for some reason , As a result, the following content cannot be rendered , So that the whole page becomes a white screen .
It could be JS Loading is blocked , As a result, the page cannot be parsed . Finally, the whole page becomes white .
Optimization method
The best way to optimize , It must be optimized directly CSS,JS Volume , So as to fundamentally solve the problem of slow loading , Load blocking problem
besides , The tricky way is to put a large volume CSS and JS Put in body Tail end , Then use a small amount for positioning and other basic styles CSS Put it in the head , Make sure that the page will load the basic styles and elements of the page first , Then load JS Of Script Labels can also be added async,defer attribute , send JS The loading of becomes asynchronous , such JS Loading will not block page parsing
边栏推荐
- 【LVGL布局】网格布局
- 【USB电压电流表】基于STM32F103C8T6 for Arduino
- Detailed analysis of the process (life cycle) of class loading
- 【微信小程序】一文搞懂条件渲染、列表渲染以及wxss模板样式
- 【LVGL(重要)】样式属性API函数及其参数
- Redis特殊数据类型-GEO
- [lvgl (5)] label usage
- Learn more about when to use MySQL two locks (table lock and row lock)
- 济南人社已签1W+电子劳动合同,法大大助力HR数字化
- 【波形/信号发生器】基于 STC1524K32S4 for C on Keil
猜你喜欢

Kubernetes' deployment, service concept, dynamic capacity expansion

不运动也能增肌???打一针冬眠黑熊的血清就行
![[lvgl layout] flexible layout](/img/7b/db932e25b13a0b494e7920075cf1e2.png)
[lvgl layout] flexible layout

【LVGL布局】网格布局

These 10 kinds of timed tasks have been learned, and you can float directly

JMeter distributed pressure measurement

Redis.conf详解
![[media controller] open source project learning notes (based on Arduino micro development board)](/img/08/39ed97437f235806c6d4415f53c47b.png)
[media controller] open source project learning notes (based on Arduino micro development board)

SSH Remote Access and control

【LVGL(4)】对象的事件及事件冒泡
随机推荐
【学习笔记】网页出现白屏可能的原因与优化方法
Learn more about when to use MySQL two locks (table lock and row lock)
Detailed explanation of class loader and parental delegation mechanism
MapReduce(一)
Introduction to kubernetes (kubernetes benefits)
10分钟就能写出来的——25~30K的国外企业招聘面试考题,这不是轻轻松松吗~
kubernetes 的Deployment(部署),Service概念,动态扩缩容
[lvgl (5)] label usage
[lvgl (important)] style attribute API function and its parameters
[small object velocimeter] only principle, no code
【学习笔记】从汇编看 a+++a与 a+a++的区别
Kubernetes rapid installation
【LVGL(重要)】样式属性API函数及其参数
Redis分布式缓存学习笔记
一个AI玩41个游戏,谷歌最新多游戏决策Transformer综合表现分是DQN的两倍
Machine learning case: smoking in pregnant women and fetal health
DHCP principle and configuration
MySQL gets the self incrementing line mark (different from MySQL version)
【ESP8266点焊机】基于 ESP8266 for Arduino
postgresql 日期处理函数用法