Comments (3)
asyncData请求貌似只有首次进入页面之前会被调用,而无法在组件内部再次调用。
不过可以通过动态路由来解决翻页后服务端渲染这个问题。
至于index.vue,个人认为服务端渲染一次达到seo足以。可以从业务层规避首页翻页的问题,可以增加跳转列表链接来解决。
当然,如果nuxt有后续方案最好。
from nuxt-blog.
您好,感谢您的支持!
点击下一页其实是请求了数据,游览器返回200状态。
如果您在asyncData
中请求,就是在服务器端发起了请求,速度依然要比客户端请求要快了很多。
在nuxt.js更新了2.0中也存在同样的问题,详情请看:#3999
from nuxt-blog.
他的优点就是首屏渲染和SEO优化,当然至今来看有很多不足的地方。因为是服务器端渲染,所以在开发环境缓存很严重、部署占用服务器内存过高等等。这也是需要官方去修正的。
非常感谢您的issues,谢谢!
from nuxt-blog.
Related Issues (5)
- 验证问题 HOT 1
- serviceUI 图片显示问题 HOT 1
- backpack dev的时候报错了,不支持webpack4吗,webpack版本是4.20 HOT 3
- 请教下关于nuxt部署的一些问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt-blog.