Any website hosted with CLDMV can now automatically serve up concatenated JS and CSS files. For example:
http://cdn.cldmv.net/cldmv/min/cldmv/jquery/?base64.js,decode.js
The above URL is two separate files put together and minified as well. Now lets go over the portions of the URL:
The prefix of the URL (this is required in order to get the script to work.
1 2 3 |
http://cdn.cldmv.net/cldmv/min/ |
The directory:
1 2 3 |
cldmv/jquery/ |
Then the marker to indicate the files you want to serve (this is required and never changes):
1 2 3 |
? |
Then finally the files you want to serve under the above directory:
1 2 3 |
base64.js,decode.js |
Each file is separated by a comma.
Normally to get both of these scripts to run you would include the follow urls:
1 2 3 4 |
http://cdn.cldmv.net/cldmv/jquery/base64.js http://cdn.cldmv.net/cldmv/jquery/decode.js |
Instead you can now just include:
1 2 3 |
http://cdn.cldmv.net/cldmv/min/cldmv/jquery/?base64.js,decode.js |
Update: Since Chrome has an issue with double question marks I’ve reduced the code to only require a single question mark.