Nuxt.js: SSR and SPA along side for different routes

Created on 10 Mar 2018  路  6Comments  路  Source: nuxt/nuxt.js

Is it possible to have SSR for some pages and SPA for other (where I dont care about SEO)?

This question is available on Nuxt.js community (#c2591)

Most helpful comment

As @DreaMinder mentioned private pages, or pages that I dont care about SEO in general.

All 6 comments

I don't think it's currently possible. Why exactly do you want this kind of behavior?

Good suggestion. It would by quite handy for private pages. In some cases authentication is easier to implement in SPA-only mode. I use no-ssr wrapper for such pages, for example in shopping cart page.

As @DreaMinder mentioned private pages, or pages that I dont care about SEO in general.

@Mrkisha Wrap content in <no-ssr>, refrain from using fetch() and asyncData() in your desired pages and they're essentially SPAs.

BTW it can be implemented by declaring SPA-routes in reverse-proxy (nginx) to use SPA-fallback entry point file, 200.html.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattdharmon picture mattdharmon  路  3Comments

mikekidder picture mikekidder  路  3Comments

gary149 picture gary149  路  3Comments

vadimsg picture vadimsg  路  3Comments

uptownhr picture uptownhr  路  3Comments