Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
JS Lazy loading Server Implementation

If I have an Angular or React Single Page application and some of the routes are lazy loaded, my understanding is that if a user opens the web app, some of the JS bundles won't immediately be sent to their browser. But if they navigate to some of the lazy-loaded routes, then the additional JS bundles will be sent to the browser.

Let's say I'm hosting the app on Firebase hosting, or some other CDN. How can the hosting server possibly implement the logic to know which JS bundles to send to the user? Am I misunderstanding something? I haven't seen much discussion online about this topic, but it doesn't make much sense to me.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Hosting provider does not know; its not their job.

With code-splitting and dynamic import techniques, you can lazyload parts.

https://reactjs.org/docs/code-splitting.html#reactlazy

https://reactrouter.com/docs/en/v6/examples/lazy-loading

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!