title: Does prefetch data by Apache before serving a SPA site hurt performance?
body: <p>I have this application containing 2 parts:</p>
  
  <ul>
  <li>User-facing SPA web served by Apache</li>
  <li>NodeJS API server</li>
  </ul>
  
  <p>When a user go to the SPA web, Apache will do authentication and prefetch data for that user by making a POST and a GET request to the API before serving the page. This works fine for normal days, but it is pretty slow when there is a lot of traffic.</p>
  
  <p>Apart from improving the API, I think delegating authentication and data fetching to client-side would improve performance.</p>
  
  <p>My questions are:</p>
  
  <ul>
  <li>Does prefetch data by Apache before serving the SPA page hurt performance?</li>
  <li>And would it be better to let client-side does the fetching?</li>
  </ul>