Blazor wasm, IIS, compression not for all files - iis

I have a web app created with blazor wasm standalone and published on IIS.
I use custom web.config for enable compression, as described here
link
I noticed that not all files are compressed. Files under _content folder (css and js) are non compressed (there is no .br and .gz version).
Is there a way to enable compression also for this files?
Thank you

I found this:
https://github.com/dotnet/aspnetcore/issues/37836
and seems that files outside framerork folder are not compressed in Net6.
There is i way to compress them?
should i use IIS dynamic compression?
Thank you

Related

How do I enable GZip compression for Linux Azure App Services?

I have deployed two app services
Windows
https://mysamplewinapp.azurewebsites.net/
Linux
https://mysamplelinuxapp.azurewebsites.net/
Going to https://www.giftofspeed.com/gzip-test/ and inputting the URLs in I can see that the Windows one GZIP is enabled, the Linux one GZIP is not enabled.
How do I get Linux app service to support Gzip compressed?
Newest
I carefully compared the differences between webapp deployed under windows and linux.
It is found that the webapp deployed under Linux has very little content in the Response Headers.
In windows.
In Linux.
Suggestion:
So we just need to add Content-Encoding: gzip in Response Headers, then we can solve the issue.
PRIVIOUS
We can enable gzip compression by code.
I don't know what language your webapp is written in. But there must be a way to achieve it through code or configuration files in the project. You need to search by google according to the code language, you can also tell me, I will help you solve it together.
Below test (NodeJS) wen can find my webapp in linux support Gzip compressed.
I have a nuxtjs project deployed in azure webapp linux environment.
I am new to nuxt, and create new demo then deploy it. So I think we can enable gzip compression by code.
So I seacrh gzip in my project.

Azure Linux Web App not compressing files for dotnet core

I'm investigating load times for my Angular app built in dotnet core 3.1 hosted on a Azure Linux web app and have noticed that the javascript files are not compressed:
I've read that by default Azure Web Apps should compress responses and I shouldn't have to do anything to enable this. However, as I am running Kestrel I don't think I can take advantage of server compression, is that correct?
If I can't use server compression I can use Response Compression, but wanted to check that this is the correct course of action? As the javascript files I'm mostly interested in are mostly static, would this middleware be compressing them every time or would it cache them?
Thanks

Serving gzipped html which is a merge of two gzipped that works on Chrome

I would like to have the top part of the page (from <html> until the </head>) in one shared gzipped file and the rest of the page separately, and serve them as one gzipped html document.
Note that Chrome is not supporting multi member gzipped file (concatenated gzipped)
I can keep the files uncompressed, merge them and compress them in runtime, but that will hurt performance and it is a big issue here (we are caching billions of files)
How can I merge gzipped files without creating multi member file or serve html file that is comprised of two parts?
Is there any workaround for gzipping two files for Chrome?
Try to use https://varnish-cache.org. It has ESI feature https://www.varnish-cache.org/docs/3.0/tutorial/esi.html. So it probably do exactly what you want. As an additional plus, you also dont have to maintain you own caching software, because for decades of development there are already well developed products, that solves this.

worklight server preview wont show png resources anymore after configuring it to serve svg

I ran in the problem where svg images were not loading using WorkLight preview. I found the solution for that here: How can I configure Worklight to serve *.svg files with contentType=image/xml+svg?
After adding these lines
<mimeTypes>
<type>svg=image/svg+xml</type>
</mimeTypes>
svg files appeared on preview, but now i can't load png files. Is there a way to make all the formats work?
Did you try to add another type for .png then?
<mimeTypes>
<type>svg=image/svg+xml</type>
<type>png=image/png</type>
</mimeTypes>

Minify resource files with IIS, when using Java and .JSP

I was recommended that I move this question from StackOverflow to here.
I am running a web site on a server with Tomcat and IIS. I use .JSP and Java in the back end.
I don't know how to configure IIS to automatically minify resource files (CSS, JavaScript, images) when using .JSP. I have found a few suggested solutions online, but they all apply to IIS and .ASP.
I added the "compression" tag to this post because there is no "minification" tag available, but I am not referring to gzip compression, but removing white spaces, merging resources for faster download etc.
Could anyone help me figure out how to configure IIS to minify resource files with .JSP? Thank you!
Minification a process which combines multiple CSS or JS files to a single file and perform process of compression(whitespace removal) and obfuscation(JS) is an ideal build time solution, rather than a run time solution. While using Tomcat with IIS, it will be good to have some thing like this:
Use WRO4J as a maven build time plugin. Create an attribute like
devmode=true or false. In JSP's have if else condition to define
groups to add multiple CSS/JS or Single based on the devmode value.
While deploying use devmode = false. This with maven configuration will compile JSP with single CSS/JS files.
In IIS, configure a separate VD and map your static resources of war to it. Write a rewrite rule to instruct IIS to serve the static resources. Enable static compression.
The above said configuration will take less load on the CPU.
Some links of interest could be:
https://code.google.com/p/wro4j/wiki/MavenPlugin
Unobtrusive way to combine and compress javascript/css for java/spring/maven applications?

Resources