2

Is it possible (and reliable?) to use Firebase Cloud Function for Server Side Rendering AND store the rendered file on Firebase Hosting?

  • Cloud functions SSR are getting triggered on data update, not visits
  • Using CDN for the whole page (faster, no cloud function cold start)
  • Can be really convenient in some situation (lot of read, few data updates)

SSR tutorials for firebase show how to create dynamic page with time-driven cache (not data-driven) and only use Hosting for static asset being added before the deployment.

res.set('Cache-Control', 'public, max-age=600, s-maxage=1200')

Plus i can't find any api to send rendered file to Hosting from a cloud function..?

1 Answer 1

2

Data update re-rendering of SSR pages is not supported in Firebase. It may become achievable in the future if Firebase had an API for Firebase Hosting, but as stated here https://stackoverflow.com/a/45255829/7911479 it's not on their radar.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.