Minifying and combining files in .net

后端 未结 7 2359
误落风尘
误落风尘 2020-12-23 10:43

I am looking at implementing some performance optimization around my javascript/css. In particular looking to achieve the minification and combining of such. I am developing

相关标签:
7条回答
  • 2020-12-23 11:23

    It's worthwhile combining the files at run time to avoid having to synchronise new versions. However, once they are programmatically combined, cache them to disk. Then the code which runs each time the files are fetched need only check that the files haven't changed before serving the cached version.

    If they have changed, then the compression code can run as a one-off. Whilst there will be a slight performance cost, you will also receive a performance benefit from fewer file requests.

    This is the approach that the Minify tool uses to compress JS/CSS, which has worked really well for me. It's Linux/PHP only, but you might get some more ideas there too.

    0 讨论(0)
提交回复
热议问题