Re: [Cppcms-users] combining all js and css requests in a single file
Brought to you by:
artyom-beilis
From: Artyom <art...@ya...> - 2010-12-16 11:55:17
|
----- Original Message ---- > From: Aris Setyawan <ari...@gm...> > > First of all, as far as I understand you can just use some css/javascript > > compressor > > and use it instead of ordinary file. And probably specialized compressors >would > > do a good job. > thanks > > >> How about combining small images so we can access it with css sprite? > > Isn't it what HTTP-Keep-Alive and for? > > > > Also HTTP/1.1 allows you to send several requests for different images >without > > waiting for completion of downloading first one. Isn't it better? > I read from some browsing, they are optimally used in 4 parallel > request because of DNS look up time. I was talking about HTTP Pipelining, Read this: http://en.wikipedia.org/wiki/HTTP_pipelining > I think about small, less static, same size, related images, such as > image profile in social web and try another alternative to pull them > with combining and maybe caching. I can use libgd. There is no problem serving images with CppCMS this is rather simple you don't need anything special for it just give correct content type and write it into output. And of course you can cache them in CppCMS using internal CppCMS cache. But still you need to define what you want and how to serve the files. You can even do something like that: response().content_type("image/jpeg"); sql << "SELECT image FROM profiles WHERE user_id = ?" << uid << cppdb::row >> resonse.out(); Artyom |