当前位置:网站首页>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
边栏推荐
- Mobx knowledge point collection case (quick start)
- 虚拟机的作用
- @component(““)
- JS small exercise ---- time sharing reminder and greeting, form password display hidden effect, text box focus event, closing advertisement
- L'externalisation a duré trois ans.
- gslx680触摸屏驱动源码码分析(gslX680.c)
- 按键精灵脚本学习-关于天猫抢红包
- Torefs API and toref API
- [Linux] process control and parent-child processes
- Introduction to abnova's in vitro mRNA transcription workflow and capping method
猜你喜欢

抽丝剥茧C语言(高阶)指针的进阶

Flutter riverpod is comprehensively and deeply analyzed. Why is it officially recommended?

Apache AB stress test

JSON introduction and JS parsing JSON

Redis data migration

BGP experiment (1)

How can a 35 year old programmer build a technological moat?

"Xiaodeng in operation and maintenance" meets the compliance requirements of gdpr

L'externalisation a duré trois ans.

Tencent's one-day life
随机推荐
直播平台源码,可折叠式菜单栏
How to reduce inventory with high concurrency on the Internet
Deep learning Flower Book + machine learning watermelon book electronic version I found
Implementing data dictionary with JSP custom tag
计算机服务中缺失MySQL服务
Leetcode-226. Invert Binary Tree
Leetcode-206. Reverse Linked List
JS plot flot application - simple curve
2、 Concurrent and test notes youth training camp notes
【性能压测】如何做好性能压测?
KBU1510-ASEMI电源专用15A整流桥KBU1510
leetcode:105. 从前序与中序遍历序列构造二叉树
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
About binary cannot express decimals accurately
../ And/
Kuboard can't send email and nail alarm problem is solved
Detailed explanation of neo4j installation process
Outlier detection technology of time series data
点亮显示屏的几个重要步骤
弹性布局(二)