当前位置:网站首页>单页面开发与多页面开发的优缺点
单页面开发与多页面开发的优缺点
2022-06-12 11:59:00 【mustang(野马)】
**单页面应用(SPA):**指只有一个主页面的应用,包含( html, js, css)。所有的页面内容都包含在这个所谓的主页面中。但在写的时候,还是会分开写(页面片段),然后在交互的时候由路由程序动态载入,单页面的页面跳转,仅刷新局部资源。多应用于pc端。
单页面的优点:
1,用户体验好,快,内容的改变不需要重新加载整个页面,基于这一点spa对服务器压力较小
2,前后端分离
3,页面效果会比较炫酷(比如切换页面内容时的专场动画)
单页面缺点:
1,不利于seo
2,导航不可用,如果一定要导航需要自行实现前进、后退。(由于是单页面不能用浏览器的前进后退功能,所以需要自己建立堆栈管理)
3,初次加载时耗时多
4,页面复杂度提高很多
多页面(MPA),就是指一个应用中有多个页面,页面跳转时是整页刷新。
多页面的缺点:
页面切换加载缓慢,用户体验不好,流畅度差。
边栏推荐
- 影响店铺权重的三十一条,快来看看中招了吗
- 6.6 rl:mdp and reward function
- Index in MySQL show index from XXX the meaning of each parameter
- conda环境下pip install 无法安装到指定conda环境中(conda环境的默认pip安装位置)
- B.刷墙(C语言)
- Analyze the implementation principle of the onion model, and connect the onion model in your own project
- [QNX hypervisor 2.2 user manual] 4.1 method of building QNX hypervisor system
- 5G NR協議學習--TS38.211下行通道
- Decision tree of machine learning
- K52. Chapter 1: installing kubernetes v1.22 based on kubeadm -- cluster deployment
猜你喜欢

必杀技--使用FFmpeg命令快速精准剪切视频

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

Chaîne la plus longue sans caractères dupliqués (leetcode 3)

6.6 RL:MDP及奖励函数

ARM处理器模式与寄存器

TinyMCE realizes automatic uploading of pasted pictures

Who moved my package lock

UML系列文章(31)体系结构建模---部署图

Video JS library uses custom components

7-5 complex quaternion operation
随机推荐
5g NR Protocol Learning - - ts38.211 downlink channel
第六章 数据类型(五)
Process creation and recycling
Reprint --win10 open the task manager to solve the blue screen problem
单元测试用例框架--unittest
FPGA Development - Hello_ World routine
LeetCode 1037. Effective boomerang (vector cross product)
机器学习基础概念
Design of secure chat tool based on C #
TinyMCE series (II) TinyMCE plug-in development
Data processing instructions of arm instruction set
LeetCode 890. 查找和替换模式(模拟+双哈希表)
UML系列文章(30)体系结构建模---制品图
创建Servlet项目
System.IO.FileLoadException异常
【QNX Hypervisor 2.2 用户手册】4.1 构建QNX Hypervisor系统的方法
Basic concepts of machine learning
ARM处理器模式与寄存器
LeetCode_ Binary search_ Medium_ 162. looking for peaks
NVIDIA Jetson Nano Developer Kit 入门