当前位置:网站首页>About the state transfer problem of SAP e-commerce cloud Spartacus UI SSR
About the state transfer problem of SAP e-commerce cloud Spartacus UI SSR
2022-08-04 20:04:00 【HUAWEI CLOUD】
Angular's TransferState class enables server-side rendering (SSR) and pre-rendering (SSR) Angular applications to efficiently render in the browser using data fetched from the server.
I created a storefront with Schematics based on version 3.4.5 (which a customer is using) and ran it in SSR mode.
I visit http://localhost:4000/ in my browser.
From Chrome Dev Tools I know that the source code of the home page is successfully generated by the SSR server.

However, even in SSR mode, I found that the /cms/pages OCC API is still triggered from the client.


In the log of the SSR server, I did not find the CSR fallback:

However, on the client side, I still found these OCC API calls:
Even if I use code like this:
ConfigModule.withConfig({ state: { ssrTransfer: { keys: { products: true, cms: true } } }}); Only make sure that the client is not sending product related API calls.

Answers
- For Product - I guess the status has moved from SSR to CSR.
- For cms - I guess we make the call whether we are in the ngrx store or not.What we are discussing may be improved in the future
By default, Spartacus reloads CMS page data on every route change, regardless of whether it is already maintained in ngrx state.However, customers can configure routing.loadStrategy differently via Spartacus: RouteLoadStrategy.ONCE
It is used in the CmsPageGuard.shouldReload method.
边栏推荐
- 《支付宝体验设计精髓》一书,跟测试相关性知识记录
- Use "green computing" technology to promote sustainable development of computing power
- 如何找到某个 ABAP structure 某字段的源头来自哪个数据库表
- Desthiobiotin衍生物Desthiobiotin-PEG4-Amine/Alkyne/Azide/DBCO
- 泰山OFFICE技术讲座:底纹、高亮、边框的关系
- Force KouTi (5), the longest text string back
- AWS SES 的监控和告警
- hash和history路由的区别
- 微信小程序云开发 | 赠、删、改城市名称信息的应用实现
- web 应用开发最佳实践之一:避免大型、复杂的布局和布局抖动
猜你喜欢

刷题-洛谷-P1319 压缩技术

37.轮播图

用“绿色计算“技术推动算力可持续发展

How to promote the implementation of rural revitalization

【AGC】构建服务1-云函数示例

linkboy 5.0 正式发布,新增语音识别、图像识别

图片延迟加载、预加载

Use "green computing" technology to promote sustainable development of computing power

Go study notes (Part 1) Configuring the Go development environment

带你了解数据分布式存储原理
随机推荐
awk statistical difference record
致-.-- -..- -
c sqlite...
win10终端中如何切换磁盘
Unreal 本地化 国家化 多语言
搭建MyCat2一主一从的MySQL读写分离
"WAIC 2022 · hackers marathon" two ants wealth competition invited you to fight!
seata源码解析:seata server各种消息处理流程
awk statistical average max min
完善的交叉编译环境记录 peta 生成的shell 脚本
Chrome安装zotero connector 插件
v-model的使用
The establishment of simple data cache layer
Differences in the working mechanism between SAP E-commerce Cloud Accelerator and Spartacus UI
Nuxt.js的优缺点和注意事项
JS手写JSON.stringify() (面试)
C语言——青蛙跳台阶(递归)
mysql的存储过程介绍、创建、案例、删除、查看「建议收藏」
阿里的arthas使用,入门报错:Unable to attach to 32-bit process running under WOW64
华为WLAN技术:AP上线及相关模板的配置实验