The following is my current understanding of prerendering. Please correct me if I am wrong.
Imagine I have an Angular 7 application dashboard gated behind a login page. I will use angular universal (or other tools) to prerender login page and dashboard page (just a shell with loader), which will live with rest of my app as login/index.html
and dashboard/index.html
.
If users go to /login
or /dashboard
page, Nginx will check if cookie. If cookie says the user is logged in, Nginx will serve dashboard/index.html
, otherwise, Nginx will serve login/index.html
Is the above correct?
Also, I have two questions:
What if someone is not using Nginx and just using S3? How will they handle the above scenario without cookie access?
What if someone goes to the unknown router? Say /not-found-route
? How do you show a 404 page using prerendering?
Pre-rendering creates a full quality version of a composite shot or video asset, providing faster performance. This is particularly useful when using embedded composite shots or using composite shots on the editor, as you can maintain fast performance regardless of the complexity of the timelines involved.
When you Pre-render, After Effects will render the selected comp elements as a lossless movie and automatically replace them with the rendered file in your comp, often saving you significant rendering time for the final output.
With prerendering, the content is prefetched and then rendered in the background by the browser as if the content had been rendered into an invisible separate tab.
Pre-rendering is the process in which video footage is not rendered in real-time by the hardware that is outputting or playing back the video. Instead, the video is a recording of footage that was previously rendered on different equipment (typically one that is more powerful than the hardware used for playback).
If that's about deploying on another server it should have access to the cookies. (However, I'm not sure if that's right, since I can make any cookie myself and provide you with it. You should be checking with your Backend this cookie).
The prerendered shell is just for showing a small part of UI while the actual app is being loaded. Then it's being replaced with the real app. Routes and guards etc. start working and Angular app takes care of anything else.
Also, I'm sure for 99% that any information that you need to hide from unauthorised user is being fetched from the server will have to pass your Angular's guards and Backend's auth checks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With