当前位置:网站首页>单页面开发与多页面开发的优缺点
单页面开发与多页面开发的优缺点
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
- Who moved my package lock
- Tpage design
- 影响店铺权重的三十一条,快来看看中招了吗
- LeetCode_二分搜索_中等_162. 寻找峰值
- NVIDIA Jetson Nano Developer Kit 入门
- 邻居子系统之邻居项状态更新
- Must do skill -- use ffmpeg command to quickly and accurately cut video
- 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)‘
- Rich text editor copying pictures in word documents
猜你喜欢

Ficusjs series (I) introduction to ficusjs

Basic principle of Doppler effect

UML series articles (30) architecture modeling -- product diagram

JS to load and display Excel files

Doris记录服务接口调用情况

无重复字符的最长字符串(LeetCode 3)

TinyMCE series (I) TinyMCE environment construction

Longest string without duplicate characters (leetcode 3)

Find the median of two ordered arrays (leetcode 4)

Chaîne la plus longue sans caractères dupliqués (leetcode 3)
随机推荐
QML学习 第二天
Asynchronous path processing
K52. Chapter 1: installing kubernetes v1.22 based on kubeadm -- cluster deployment
Google Earth Engine(GEE)——Kmeans聚类快速进行土地分类(双for循环快速调参)
异步路径处理
机器学习之线性模型
The first thing with a server
First understand the onion model, analyze the implementation process of middleware, and analyze the source code of KOA Middleware
Lambda and filter, List 和 numpy array的索引,以及各种距离指标distance-metrics,拼接数组以及axis=0 and axis=1的区分
[QNX hypervisor 2.2 user manual] 4.1 method of building QNX hypervisor system
【QNX Hypervisor 2.2 用户手册】4 构建QNX Hypervisor系统
一个人必须不停地写作,才能不被茫茫人海淹没。
7-5 complex quaternion operation
Blue Bridge Cup 2015 CA provincial competition (filling the pit)
Neighbor item status update of neighbor subsystem
Shardingjdbc-5.1.0 monthly horizontal table splitting + read-write separation, automatic table creation and node table refresh
单元测试用例框架--unittest
Tpage design
Analyze the implementation principle of the onion model, and connect the onion model in your own project
Unit test case framework --unittest