When I'm in development mode through npm run dev, asyncData always calls an API and updates my page with the latest information whether it is server-side rendered or client-side rendered. However, after I run npm run generate and deploy my site to S3, the page only displays the latest information when I navigate to the route from the client side. If I refresh the page to force a server render, asyncData does not update the page with new information. Is this by design? What would be the proper way to always force the API to be called from a static site? Should the API call also take place in a life cycle hook when it is server rendered?
To elaborate more on my use case, I do not care if Google sees old data, but I want the user to always see the latest data.
https://uptownhr.gitbooks.io/q-a-and-examples-for-nuxt-vue-js/content/chapter1.html
It will statically be set. So google and your users will see it all the time. If you want you're users to see an updated version, add another ajax call on the created hook
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
https://uptownhr.gitbooks.io/q-a-and-examples-for-nuxt-vue-js/content/chapter1.html
It will statically be set. So google and your users will see it all the time. If you want you're users to see an updated version, add another ajax call on the created hook