MVC - Is an HTML Assessment Worth It?

http://cestdumeleze.net/blog/2011/minifying-the-html-with-asp-net-mvc-and-razor/

This sounds like a reasonable way to minimize HTML; My question is whether this might be worth it, or if it creates problems.

Are there any potential performance issues that I should be aware of?

I already minify / gzip all my css / js

+6
source share
3 answers

Imho, this is a classic case of premature optimization. It will not create problems if done correctly, but there are some problems that do this, well, not such a big deal. Nobody uses dial-up speeds anymore, not even mobile users, so saving up to 1 ms doesn't make much of a difference. In addition, most web platforms now actively use gzip over http so that your page is already transparently compressed, making these efforts even more unnecessary.

Now someone has to say that there is no such thing as overly optimizing things, I just ask for the difference. Especially if I have to pay someone for this :)

+4
source

I personally would not bother. Whitespace makes up a small, very small amount of HTML, and if it is executed at runtime, you will suffer a performance hit by simply executing the mini-code. (Javascript, on the other hand, can do much more, because lines of code tend to be short, and the compiler can significantly shorten variable names.)

If you want to improve page loading time, and you have already minimized CSS and JS, try placing static content with a CDN and / or setting the appropriate Expires headers in your content. This can significantly affect.

+2
source

I think it really depends on the size of your pages and user load, if the bandwidth limit is a limit, then you should take this into account.

+1
source

Source: https://habr.com/ru/post/909008/


All Articles