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

**URL:** <https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435>\
**Category:** Ionic Angular\
**Created:** [May 20, 2022, 1:26pm UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435 "2022-05-20T13:26:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![qinqi](https://avatars.discourse-cdn.com/v4/letter/q/da6949/32.png) [@qinqi](https://forum.ionicframework.com/u/qinqi)\
**Post date:** [May 20, 2022, 1:26pm UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/1 "2022-05-20T13:26:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![qinqi](https://avatars.discourse-cdn.com/v4/letter/q/da6949/32.png) [@qinqi](https://forum.ionicframework.com/u/qinqi)\
**Post date:** [May 22, 2022, 12:59am UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/2 "2022-05-22T00:59:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [May 22, 2022, 4:43am UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/3 "2022-05-22T04:43:39Z")

</div>

Hi

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

---

<div class="post-metadata">

**Author:** ![qinqi](https://avatars.discourse-cdn.com/v4/letter/q/da6949/32.png) [@qinqi](https://forum.ionicframework.com/u/qinqi)\
**Post date:** [May 22, 2022, 6:55am UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/4 "2022-05-22T06:55:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [May 22, 2022, 8:12am UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/5 "2022-05-22T08:12:50Z")

</div>

> [@Angular Universal update](https://forum.ionicframework.com/t/angular-universal-update/213522/2):
>
> wave Hey there! So We haven’t done too much to be 100% honest. The general up-keep of SSR tooling is an uphill battle, plus Angular was also working on their own “official” SSR implementation that should address many issues we saw. Basically, the old javascript DOM implementation that the older angular universal would ship with partially patched the DOM APIs, but still required a lot of work on Ionic/stencil. But this newer implementation uses JSDOM which covers the entire DOM api. Meaning w…

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

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [May 22, 2022, 8:16am UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/6 "2022-05-22T08:16:24Z")

</div>

> [@qinqi](#):
>
> Maybe angular universal works fine with SPA, but our application is hybrid app.

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

---

<div class="post-metadata">

**Author:** ![qinqi](https://avatars.discourse-cdn.com/v4/letter/q/da6949/32.png) [@qinqi](https://forum.ionicframework.com/u/qinqi)\
**Post date:** [May 24, 2022, 2:30pm UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/7 "2022-05-24T14:30:28Z")

</div>

> [@Tommertom](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [May 24, 2022, 2:32pm UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/8 "2022-05-24T14:32:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![qinqi](https://avatars.discourse-cdn.com/v4/letter/q/da6949/32.png) [@qinqi](https://forum.ionicframework.com/u/qinqi)\
**Post date:** [May 24, 2022, 2:47pm UTC](https://forum.ionicframework.com/t/how-can-i-do-ssr-in-a-hybird-ionic-app-partial/223435/9 "2022-05-24T14:47:36Z")

</div>

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.
