loading multiple JS files in one request


d d

I saw a weird thing the other day. A script tag that had multiple JS
files being loaded at the same time, from the one tag. It was basically
like this:

<script src="file1.js,file2.js,somefolder/file3.js,file4.js">

All files came back as one concatenated big file.

I asked our MIS server dude if we could do this with Apache servers. I
thought that maybe there was some kind of server plugin that parsed the
request looking for commas, got all the files and returned them as if
they were one file. He'd never heard of such a thing.

Has anyone here heard of anything like this without using an active
server page?

The site I saw this at was www.livejournal.com. You can see the request
in Fiddler or Charles as the first thing the html page requests. In the
response you can clearly see where the different files are starting and
finishing just from the header style of the comments and the filenames
in the comment blocks.



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question