I'm thinking of the following two requests:
Request 1:
Load all static HTML, JavaScript, images, etc. the website framework so to speak. Then fire a second request to get dynamic content (say news items, latest posts).
Request 2
Send new HTML, JavaScript, images, etc. as required by dynamic content.
I'm expecting the first request to be cached for subsequent times a user visits the website, and thus to be a non-issue for returning users. But for first-time users should I maybe build the entire content server-side and send it together in one request? Since in the approach above, both requests need to be responded to in order for the user to be able to use the website.
Can I just leave it as two requests (easier for me to program, since I'm building single page app that relies on Ajax requests)? Or is there an easy way to build everything server side and avoid two requests the for first time users?
... but wouldn't that break the caching mechanism, since the same URL would return partially different content each time?
Is this a known issue with a known solution?