当前位置:网站首页>单页面开发与多页面开发的优缺点
单页面开发与多页面开发的优缺点
2022-06-12 11:59:00 【mustang(野马)】
**单页面应用(SPA):**指只有一个主页面的应用,包含( html, js, css)。所有的页面内容都包含在这个所谓的主页面中。但在写的时候,还是会分开写(页面片段),然后在交互的时候由路由程序动态载入,单页面的页面跳转,仅刷新局部资源。多应用于pc端。
单页面的优点:
1,用户体验好,快,内容的改变不需要重新加载整个页面,基于这一点spa对服务器压力较小
2,前后端分离
3,页面效果会比较炫酷(比如切换页面内容时的专场动画)
单页面缺点:
1,不利于seo
2,导航不可用,如果一定要导航需要自行实现前进、后退。(由于是单页面不能用浏览器的前进后退功能,所以需要自己建立堆栈管理)
3,初次加载时耗时多
4,页面复杂度提高很多
多页面(MPA),就是指一个应用中有多个页面,页面跳转时是整页刷新。
多页面的缺点:
页面切换加载缓慢,用户体验不好,流畅度差。
边栏推荐
猜你喜欢

Video JS library uses custom components

QT添加QObject类(想使用信号和槽)遇到的问题汇总,亲测解决有效error: undefined reference to `vtable for xxxxxx(你的类名)‘

ARM processor mode and register

6.6 separate convolution

QT adds a summary of the problems encountered in the QObject class (you want to use signals and slots) and solves them in person. Error: undefined reference to `vtable for xxxxx (your class name)‘

A.前缀极差

JS to load and display Excel files

5g NR Protocol Learning - - ts38.211 downlink channel

mysql复习

6.6 rl:mdp and reward function
随机推荐
6.6 分離卷積
Doris记录服务接口调用情况
Channel Shuffle类
视频分类的类间和类内关系——正则化
Relation entre les classes et à l'intérieur des classes de classification vidéo - - Régularisation
Index in MySQL show index from XXX the meaning of each parameter
Pytorch笔记
Byte order - how to judge the big end and the small end
Tpage design
Analyze the implementation principle of the onion model, and connect the onion model in your own project
[foundation of deep learning] back propagation method (1)
Longest string without duplicate characters (leetcode 3)
Load/store access instruction of arm instruction set (2)
Lambda and filter, List 和 numpy array的索引,以及各种距离指标distance-metrics,拼接数组以及axis=0 and axis=1的区分
[foundation of deep learning] learning of neural network (4)
System.IO.FileLoadException异常
UML series articles (30) architecture modeling -- product diagram
Design of virtual scrolling list
6.6 rl:mdp and reward function
ARM指令集之Load/Store访存指令(二)