How can I do SSR in a hybird ionic app?(partial)

I’m a backend architect, but know very little about frontend. I’m wondering if it’s possible to server side-rendering certain pages in a hybrid app? (some pages that only contain code that is fully executable in the browser)Probably this is a stupid question, Some code that depends on the mobile phone to execute, certainly cannot do SSR, but our customer wants to do it. Can anyone help me out, help me find a way, or give me a reason why this doesn’t work.

no one can help…
Maybe ionic has no support for this.


Ssr is something determined by the js framework you want to use

Like Angular with Universal as Ssr solution and Next.js for React (I believe)

Then the question narrows to if that ssr solution works nicely with ionic

What ssr framework are intending to use?

As for angular I am not sure it it works

There are a number of posts relates to this

Thank you for your reply. What I want to use is angular universal. Couldn’t find an example of usage on the web. I can also convince my customer if the ionic official has a clear statement mentioning that ssr is not supported.
Maybe angular universal works fine with SPA, but our application is hybrid app.

U could try a test app to see if it works now but i fear the silence around it is telling

On the other hand angular is evolving rapidly so maybe there is better support

Then still a working tutorial seems missing

Not sure what you mean by hybrid in this sense - ssr + spa or spa with capcitor?

Thank you for you reply. I tested it, not work.
Maybe the reason it that the package(apk or ios package) can not communicate with ssr server.

does the ionic ssr implementation work on browser? If so, I’d love to learn how you pulled it off!

Yes, work fine on browser.Just follow the process in the blog. If it doesn’t work, it may be a problem caused by the versions of various modules.

1 Like