On Oct 4, 6:32 pm, Michael Snoyman <
mich...@snoyman.com> wrote:
> The recommended approach here would be to put those individual snippets
> into Julius and Lucius files, and then Yesod will automatically concatenate
> the output for you. Is there a specific reason why you need to use static
> files instead of templates?
I want to keep static files which are added for every page separate
from dynamic ones which are added for some of them:
Suppose I have 1 js file, 300kb, it will give temporary file with
hashsum A, then suppose that for one page i'd like to add one more js
file - combined file will contain both files, so client browser will
have to download 300kb of info which should be already cached + extra
data, which means that for every combination of included files clients
will have to download that 300kb over and over again. It gets much
worse when I want to add some dynamic data to those lucius/julius
files - client will have do download that 300kb for every request
(polluting my tmp folder with files which never will be used again).
Big combined file can be stored already minified/compressed for gzip
transfer encoding (this can also be true for dynamically