当前位置:网站首页>单页面开发与多页面开发的优缺点
单页面开发与多页面开发的优缺点
2022-06-12 11:59:00 【mustang(野马)】
**单页面应用(SPA):**指只有一个主页面的应用,包含( html, js, css)。所有的页面内容都包含在这个所谓的主页面中。但在写的时候,还是会分开写(页面片段),然后在交互的时候由路由程序动态载入,单页面的页面跳转,仅刷新局部资源。多应用于pc端。
单页面的优点:
1,用户体验好,快,内容的改变不需要重新加载整个页面,基于这一点spa对服务器压力较小
2,前后端分离
3,页面效果会比较炫酷(比如切换页面内容时的专场动画)
单页面缺点:
1,不利于seo
2,导航不可用,如果一定要导航需要自行实现前进、后退。(由于是单页面不能用浏览器的前进后退功能,所以需要自己建立堆栈管理)
3,初次加载时耗时多
4,页面复杂度提高很多
多页面(MPA),就是指一个应用中有多个页面,页面跳转时是整页刷新。
多页面的缺点:
页面切换加载缓慢,用户体验不好,流畅度差。
边栏推荐
- FPGA Development - Hello_ World routine
- MySQL - built in function
- QML学习 第二天
- Deep learning and CV tutorial (14) | image segmentation (FCN, segnet, u-net, pspnet, deeplab, refinenet)
- Why is there no traffic after the launch of new products? How should new products be released?
- Process creation and recycling
- Load/store access instruction of arm instruction set (2)
- 判断网络文件是否存在,获取网络文件大小,创建时间、修改时间
- The second regular match is inconsistent with the first one, and the match in the regular loop is invalid
- Pytoch notes
猜你喜欢

B.刷墙(C语言)

6.6 分離卷積

Video JS library uses custom components

Relation entre les classes et à l'intérieur des classes de classification vidéo - - Régularisation

Blue Bridge Cup 2015 CA provincial competition (filling the pit)

Who moved my package lock

無重複字符的最長字符串(LeetCode 3)

The second day of QML study

TinyMCE series (I) TinyMCE environment construction

LeetCode 890. Find and replace mode (analog + double hash table)
随机推荐
Decision tree of machine learning
Why is there no traffic after the launch of new products? How should new products be released?
Channel shuffle class
树的前序,中序,后序遍历
Neighbor item status update of neighbor subsystem
Promise controls the number of concurrent requests
Cookies and sessions
Load/store memory access instruction of arm instruction set (1)
kubernetes集群搭建
ARM指令集之Load/Store访存指令(二)
Blue Bridge Cup 2015 CA provincial competition (filling the pit)
Deep learning and CV tutorial (14) | image segmentation (FCN, segnet, u-net, pspnet, deeplab, refinenet)
邻居子系统之邻居项状态更新
SSL引入原因及加密步骤
TinyMCE series (II) TinyMCE plug-in development
Byte order (network / host) conversion
Pytorch笔记
转载--win10打开任务管理器就蓝屏的问题
Doris记录服务接口调用情况
Video JS library uses custom components