Last post Jul 12, 2020 10:29 AM by TDP
Jul 11, 2020 12:00 PM|TDP|LINK
please see this site view-source:https://www.pinterest.com/pin/517210338432366716/
go to view page source from browser. you notice their html is probably minified. i just do not understand how they compose their html?
please guide me is it possible in asp.net mvc to minify html with white space removed ? most of the web site content comes from db and html is not static.
why many site minify their html? is that has any advantage ? because i write routine which minify html that will be invoke for every request and that may slow down the page request execution when there will be huge request comes for a site.
how efficiently minify html from asp.net mvc ? which library i should use ?
please guide me. thanks
Jul 11, 2020 02:30 PM|mgebhard|LINK
please guide me is it possible in asp.net mvc to minify html with white space removed ?
Yes. Bundling and magnification is an openly published MVC feature; https://docs.microsoft.com/en-us/aspnet/mvc/overview/performance/bundling-and-minification
Jul 11, 2020 03:23 PM|bruce (sqlwork.com)|LINK
You minify the html to make the download faster. In asp.net core this can be done with simple middleware.
Jul 12, 2020 10:28 AM|TDP|LINK
I am not after minify js and css file rather i want to minify and gzip html output at runtime.
Jul 12, 2020 10:29 AM|TDP|LINK
@Bruce Thanks a lot for sharing very good link. i am working with asp.net mvc 5 not core. so in mvc 5 which will be standard free library i can use to minify html at runtime ?
if you know few such library for asp.net mvc 5 then please share here sir.
see this link https://forums.asp.net/p/2168905/6311715.aspx?p=True&t=637301213993255913
tell me does they use any minification approach for their web site ?