A simpler way to combine html imports

103 views Asked by At

Is there a simpler way to combine all needed html imports on the fly using php. I'm working on a project an its contents are dynamically generated and cant always use vulcanize. Most of the time, my page might fail to load fully (on 1st load), or fail to include all imports. Take a look at this page

On slow internet, you have to reload a few times for the browser to catch on and load all files (by caching some files on the previous reloads).

Currently i can get up to 115 (in over 2.8min) requests while loading the site.

I might put a permanent cache expire on the files, but isn't there a way i can reduce the requests by putting all known imports in 1 file on the fly using php so that only one a few requests are made on first load?

Subsequent requests need not be a bother as I'm importing them on demand from the user.

0

There are 0 answers