Home » U++ Library support » U++ MT-multithreading and servers » Skylark - serving CSS style sheets
Skylark - serving CSS style sheets [message #40281] |
Mon, 15 July 2013 08:20  |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Hi,
I'm working with SCGI, so I'd prefere to serve ALL of my files directly from skylark and not let the webserver do it.
How can this be done ?
Is it possible to "insert" somehow the file inside compiled app and serve it directly, without saving to disk before as is done for witz templates ?
|
|
|
Re: Skylark - serving CSS style sheets [message #40284 is a reply to message #40281] |
Mon, 15 July 2013 14:17   |
|
mdelfede wrote on Mon, 15 July 2013 08:20 | Hi,
I'm working with SCGI, so I'd prefere to serve ALL of my files directly from skylark and not let the webserver do it.
How can this be done ?
|
Hi,
Have a look at Skylark/static.icpp. There is a handler which can be used to serve styles, javascripts and images. Also, it contains some support for adding links to witz templates that allow for aggressive (configurable) usage of browser caches.
mdelfede wrote on Mon, 15 July 2013 08:20 | Is it possible to "insert" somehow the file inside compiled app and serve it directly, without saving to disk before as is done for witz templates ?
|
Any file can be included into executable using *.brc file. Then you can serving simply by passing the data to Http::Content().
Best regards,
Honza
|
|
|
|
Re: Skylark - serving CSS style sheets [message #40293 is a reply to message #40285] |
Mon, 15 July 2013 21:58   |
|
mdelfede wrote on Mon, 15 July 2013 14:22 | Hi, Honza,
thank you very much for answeriny.
I already use somewhere the .brc files, but I think that it would be better to have some more 'smart' way to handle styles, javascript and image files, without having to do manually all the .brc mechanics.
Ciao
Max
|
Manually? How can it be any easier than this:
BINARY_MASK(scripts, "js/*.js")
BINARY_MASK(styles, "css/*.css")
BINARY_MASK(images, "img/*.jpg")

Honza
[Updated on: Mon, 15 July 2013 21:58] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 19:52:14 CEST 2025
Total time taken to generate the page: 0.01191 seconds
|