I was wondering if it would be possible to combine different media
files solely using the URL in order to minimize the amount of requests
made to the server. It's a little used trick that is mostly done
manually. However, doing this manually requires you to either write a
deployment script and run it each time or combine the files manually
and maintain them.
Having them done serverside would make the code easy readable and
maintainable.

Examplse using comma-separator:

This...
<link rel="stylesheet" href="http://myapp.appspot.com/media/css/
reset.css,default.css"/>
Would be equivalent to doing
<link rel="stylesheet" href="http://myapp.appspot.com/media/css/
reset.css"/>
<link rel="stylesheet" href="http://myapp.appspot.com/media/css/
default.css"/>

And...
<script src="http://myapp.appspot.com/media/js/
jquery.min.js,jquery.cookie.js,jquery.color.js,jquery.fancybox.js"></
script>
Would be equivalent to doing
<script src="http://myapp.appspot.com/media/js/jquery.min.js";></
script>
<script src="http://myapp.appspot.com/media/js/
jquery.cookie.js,jquery.color.js,jquery.fancybox.js"></script>
<script src="http://myapp.appspot.com/media/js/
jquery.color.js,jquery.fancybox.js"></script>
<script src="http://myapp.appspot.com/media/js/jquery.fancybox.js";></
script>

The handler should be very simple and not inspect the involved files
at all, just simple concatenation equivalent to this unix command:
$ cat file1.js file2.js file3.js > file1.js,file2.js,file3.js

Best regards
Seph

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to