ASP.NET Conditional Anchor Tag Helper
Get rid of if/else statements in you Razor.
Compress your HTML and static files
There's a package available for providing compression middleware.
"Microsoft.AspNetCore.ResponseCompression" : "1.0.0"
public void ConfigureServices(IServiceCollection services)
{
// Response Compression
services.Configure<GzipCompressionProviderOptions>(options => options.Level = CompressionLevel.Fastest);
services.AddResponseCompression(options =>
{
// Enable HTTPS if required
options.EnableForHttps = true;
options.Providers.Add<GzipCompressionProvider>();
// Add extra mime types to the defaults
options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[]
{
"image/svg+xml",
"application/font-woff2"
});
});
services.AddMvc();
}
public void Configure(IApplicationBuilder app)
{
// Response Compression
app.UseResponseCompression();
// MVC and static files come after
app.UseStaticFiles();
app.UseMvc();
}
Hello, my name is Lee and I work as a full-stack web developer specialising in Microsoft ASP.NET technologies. I love using Umbraco and also MANAGED, my own application management software.
Contact me at lee.gunn@secretorange.co.uk
Get in touch to talk about your project or just ask me a question.