当前位置:网站首页>vus. Precautions for SSR requesting data in asyndata function
vus. Precautions for SSR requesting data in asyndata function
2022-07-07 07:37:00 【Attacking-Coder】
Abstract
If you need to request data during server rendering, you cannot use mouted Request in life cycle , This is because mouted The request will not be sent until all component instances are hung on the page , Such a request is actually completed on the client side, which is not conducive to SEO. And we're doing it SSR The original intention is to speed up the loading of the first screen , Another is for SEO( Crawled by reptiles ),
So we're going to be here asynData Execute in the declaration cycle
Be careful
- If the page is refreshed asynData The request of is completed on the server
- If the page is jumped in by other pages, then asynData My request is in The client finished
explain : Why is the request completed on the client when entering from other pages ?
This is because the crawler will not click from a page to enter the page , It will only directly enter the designated URL So this will not affect SEO
Secondly SSR It is mainly to solve the problem of slow loading of the first screen , Then it's definitely not your first screen to jump in
边栏推荐
- Robot technology innovation and practice old version outline
- Composition API premise
- 普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
- Wechat applet full stack development practice Chapter 3 Introduction and use of APIs commonly used in wechat applet development -- 3.10 tabbar component (I) how to open and use the default tabbar comp
- Model application of time series analysis - stock price prediction
- Flutter riverpod is comprehensively and deeply analyzed. Why is it officially recommended?
- The currently released SKU (sales specification) information contains words that are suspected to have nothing to do with baby
- Hidden Markov model (HMM) learning notes
- Apache AB stress test
- Leetcode sword finger offer brush questions - day 20
猜你喜欢
mips uclibc 交叉编译ffmpeg,支持 G711A 编解码
Leetcode-226. Invert Binary Tree
C language (high-level) data storage + Practice
My ideal software tester development status
[Linux] process control and parent-child processes
How to reduce inventory with high concurrency on the Internet
MySQL service is missing from computer service
深度学习花书+机器学习西瓜书电子版我找到了
nacos
2022-07-06:以下go语言代码是否会panic?A:会;B:不会。 package main import “C“ func main() { var ch chan struct
随机推荐
Leetcode-226. Invert Binary Tree
BGP experiment (1)
我理想的软件测试人员发展状态
Build personal website based on flask
记一个并发规则验证实现
Blue Bridge Cup Birthday candles (violence)
身边35岁程序员如何建立起技术护城河?
[Linux] process control and parent-child processes
MobaXterm
解决:Could NOT find KF5 (missing: CoreAddons DBusAddons DocTools XmlGui)
机器人技术创新与实践旧版本大纲
3、 High quality programming and performance tuning practical youth training camp notes
科技云报道:从Robot到Cobot,人机共融正在开创一个时代
Example of Pushlet using handle of Pushlet
07_ Handout on the essence and practical skills of text measurement and geometric transformation
After 95, Alibaba P7 published the payroll: it's really fragrant to make up this
Model application of time series analysis - stock price prediction
Detailed explanation of neo4j installation process
虚拟机的作用
Advanced level of C language (high level) pointer