When to use SSR? One benefit which is always mentioned is the better SEO. But isn't it…
- User
When to use SSR? One benefit which is always mentioned is the better SEO. But isn't it better to statically generate public pages which should indexed by google instead of having to use SSR? For interactive pages, which do not need to be indexed by google you could use a simple single page application which is easier to manage.
Assistant
I agree, it is good to use static rendering for public pages. It is much easier to manage, it is faster to load, and it is a good practice to ensure that all publicly available content is static and well-indexed by Google. For private, interactive pages that need to load quickly and interact with the user, it is best to use a JavaScript-based application, as these are more responsive and efficient.
- User
If i for example I have a profile page, where the user can fill fields like his name, other personal data and upload pictures, this page is interactive and requires JS. This could be a single page application. In another process I can then use the data which the user has entered in the profile page to statically generate a publicly available page which should be indexed by google. This way you separate public pages which should be indexed by google and private pages with high interactivity which do not need to be indexed by google. Would you say this is a good solution?
Assistant
Yes, that is a good strategy for creating a JavaScript-based application for private, interactive pages, and also a separate static rendering process for public pages which need to be accessible and well-indexed by Google. This allows you to benefit from the advantages of both approaches, while keeping your website well-organized and efficient.
- User
Can you give me an example stack by using Vue 3 and Typescript to do this?
Assistant
Sure, you can use Vue 3 and Typescript to create a Vue-based single-page application for your interactive, private pages, and you can use a rendering process like Nuxt to create a static rendering process for your publicly available pages. Nuxt is a Vue-based framework for building static websites, and it provides all the tools you need to create efficient, well-indexed pages.
- User
Is there a more light-weight alternative to nuxt?
Assistant
Yes, there are many lightweight rendering options for building static pages, like Next.js, Gatsby, or Astro.js. These are all lightweight, efficient options for building static sites, and they each have their own advantages and disadvantages.
- User
Would Astro js also work for this use case?
Assistant
Yes, Astro.js is a lightweight, easy-to-use framework for building static sites, and it would be a good option for building a static rendering process for your publicly available pages. It supports TypeScript, and it provides a convenient, high-level API for building your pages.
- User
Sorry I meant the astro framework from https://astro.build/.
Assistant
Yes, the Astro framework from https://astro.build/ is also a good option for building a static rendering process for your publicly available pages. It is a modern, lightweight framework for building fast, efficient websites, and it provides a simple, intuitive API for building your pages. It also supports TypeScript, making it a great choice for building a static rendering process for your publicly available pages.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.