ASP.NET Monsters #92: Saving CPU Cycles with Static Resource Hashes

Download this episode

Download Video

Download captions

Download Captions

Description

In today's episode, Monster Dave prototypes an approach to generating static resource URLs to potentially improve the performance of an ASP.NET Core application. Borrowing ideas from a recent blog post by the Facebook engineering team.

 

First, we create a tag helper to generate static resource URLs based on a hash of the file's contents. Next, we write some custom middleware to rewrite those new URLs to the actual file and to always return 304 not-modified for all conditional requests.

The Blog Post: https://code.facebook.com/posts/557147474482256

NOTE: This video is intended to explore the concepts outlined in the blog post above and are not be suited for production use.

Tag:

ASP.NET

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    Add Your 2 Cents