Robert Boedigheimer works for Schwans Shared Services, LLC providing business solutions with web technologies. Robert has been developing web sites for the past 20 years. He is an ASP.NET MVP, a Pluralsight author, and a 3rd degree black belt in Tae Kwon Do. Robert regularly speaks at national and international events.
ASP.NET Core 1.0 has introduced Tag Helpers which are a much more HTML-centric approach to using server-side code to help construct HTML elements in Razor views. ASP.NET will ship with built in tag helpers such as the “environment” that can include specific HTML (such as links to CSS or script tags) based on the level of server like development, stage, or production. Tag helpers provide specific attributes for elements like the “asp-fallback-*” attributes for automatic fallback to local resources when they are not available from a CDN. The “asp-append-version” used on URLs automatically appends a hash of the file contents to allow aggressive use of expirations for caching while forcing server requests when the files are modified. Besides the many tag helpers provided directly by ASP.NET, it is also possible to use third party tag helpers or create your own! This session will review a custom tag helper used to augment the lowly “img” tag to provide simple support for responsive images that delivers the most appropriate image for a particular device and use.
Images are critical in web design, but today they make up more than 60% of a modern web page's weight. With high pixel density displays and the growth of the mobile web, it is imperative to develop a responsible balance between image usage and performance. Discover how to properly deliver appropriately sized images to each device using the new srcset attribute and picture element.