当前位置:网站首页>Spa first screen loading optimization
Spa first screen loading optimization
2022-04-22 10:27:00 【thinking ۣۖ ิิ ۣۖ * * empty**】
First screen loading
Is to enter the web address from , To render all resources to the page , The first screen loading can be said to be in the user experience above all Link , Due to single page application , Resource volume is too large , The first full load takes , Causes white screen
Load too slow
In the process of page rendering , The factors leading to slow loading speed may be as follows :
- Network delay problem
- Whether the volume of the resource file is too large
- Whether the resource repeatedly sends requests to load
- When loading scripts , The rendering is blocked
resolvent
Reduce the size of the entry file
For example, routing lazy loading and asynchronous components , When configuring the route, the route is dynamically loaded
{
path: '/404',
component: () => import('@/views/404'),
},
Static resource local cache
Forced cache and negotiation cache are adopted , Set up Cache-Control, Last-Modified, Etag Field
Reasonable use localStorage
UI The frame loads on demand
For example, using element-ui When the framework , Don't import the whole framework completely when using components , Should be imported on demand
Import all :
import ElementUI from 'element-ui'
Vue.use(ElementUI)
Import on demand :
import { Button, Input } from 'element-ui';
Vue.use(Button)
Vue.use(Input)
Compression of image resources
Small picture base64 turn , Or use online font icons 、 Sprite chart reduces server pressure
Use SSR
SSR(Server side ), That is, server-side rendering , Components or pages are generated by the server html character string , And send it to the browser
Building a server-side rendering from scratch is very complex , Vue It is recommended to use Nuxt.js Implement server-side rendering
版权声明
本文为[thinking ۣۖ ิิ ۣۖ * * empty**]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221017248470.html
边栏推荐
- Laya Uncaught ReferenceError: spine is not defined
- 谷歌AdSense提示广告抓取工具错误,这可能导致收入减少怎么办
- API 网关的功能用途及实现方式
- Unity3D build时错误提示:Missing Project ID in Unity 解决方案
- 多语言通信基础 05 go的grpc体验
- oracle中時間函數總結
- A case of MySQL implicit conversion
- 【uvm】 raise_objection之前不能加入消耗仿真时间的语句
- The computer cleans the C disk (system disk) and the disk compression (disk partition) and expansion (disk expansion).
- cobbler补鞋匠
猜你喜欢

ONEFLOW learning notes: from functor to opexprinter

Use of checkbox

【uvm】 raise_ Statements that consume simulation time cannot be added before object

MySQL最新版8.0.21安装配置教程~

Ukui3 supports openeuler 22.03 LTS

soatest初步认识

Laya Uncaught ReferenceError: spine is not defined

PCIE XDMA IP核介绍(附列表)-明德扬科教(mdy-edu.com)

基于SSM的电影在线购票系统

The debug breakpoint of idea thread pool cannot jump in
随机推荐
Google Adsense suggests that the advertising capture tool is wrong, which may lead to reduced revenue. What should we do
01背包问题——以及变形问题
批量更新软件和安全优化(以openssh为例) —— 筑梦之路
MySQL进阶之数据的增删改查(DML)
安全远程访问+安全文件传输+终端仿真+远程管理丨上海道宁联合VanDyke为IT行业人员带来可靠的、易于配置的软件
Challenges of enterprise web development
机器人系统设计-coppeliasim仿真
Laya Uncaught ReferenceError: spine is not defined
matlab的解决反复激活问题的license.lic文件
Cloud leopard intelligence, a DPU chip head enterprise, joined the openeuler community to help Digital China infrastructure
JWT source code analysis (four layer package with schematic diagram)
Google Earth engine (GEE) -- aggregate grid population data
Use of checkbox
Oracle 如何使用循环控制关键字exit、goto、continue
数字化时代,企业运维面临现状及挑战分析解读
【uvm】 raise_ Statements that consume simulation time cannot be added before object
项目如何解决跨域问题
【FAQ】HMS Core推送服务与本地创建通知消息如何相互覆盖?
Mynodequery 1.0.2.2 is released, and the Ping node specifies IPv4 or IPv6, and the dashboard adds sorting
「译文」给讨厌YAML的人的10个写YAML的建议