Search this site

Web Development

Building a website means joining up lots of small decisions. Find practical web development examples covering ASP.NET, browser APIs, CSS, testing, and performance.

21 October 2014

Getting started with the Picture element

Use the HTML picture element and srcset to serve images that suit the viewport, avoiding desktop-sized downloads on mobile and handling older browsers.

12 September 2014

HTTP vs HTTPS performance comparison

My 2014 comparison of HTTP and HTTPS page loads explores TLS handshake overhead and practical ways to measure and reduce the cost of encrypted connections.

3 July 2014

Loading CSS Asynchronously

My experiment with Filament Group's loadCSS shows how asynchronous stylesheets avoid blocking rendering, along with the flash of unstyled content tradeoff.

27 January 2014

Extending System.Web.Optimization

Extend classic ASP.NET bundling so you can add attributes such as async and media to script and style tags without losing built-in minification.

21 November 2013

Working with multiple Web.Config files

Set up separate Web.config transforms for staging and live environments in Visual Studio, using solution configurations or publish profiles.

4 October 2013

A Simple HTML Minifier for ASP.NET

The original ASP.NET HTML Minifier walkthrough shows how to minify files during Visual Studio 2012 publishing, avoiding per-request processing overhead.

23 September 2013

Fast ASP.NET Websites Book Giveaway

This archived announcement explains my three-copy Fast ASP.NET Websites giveaway, which closed on 22 October 2013, and introduces the book's practical focus.

30 August 2013

Fast ASP.NET Websites has been released!

My original Fast ASP.NET Websites launch announcement introduces the book's hands-on performance guidance and code examples for ASP.NET MVC and Web Forms.

11 August 2013

ASP.NET Release Checklist

Check tests, performance, configuration, security and custom error pages before deploying a classic ASP.NET side project with this lightweight release checklist.

20 March 2013

Free icon packs for developers

Browse five icon packs I gathered for web prototypes, including IconMonstr, IcoMoon and Typicons, with notes on the image and icon-font formats they offered.

12 March 2013

The Google PageSpeed API & MVC 4

A 2013 ASP.NET MVC 4 example uses the Google PageSpeed API to retrieve scores and suggestions, turning manual performance checks into a dashboard.

29 November 2012

How to disable Flash in all browsers

See how I disabled Flash while testing an HTML5 replacement in older Chrome, Internet Explorer, Firefox, Safari and Opera versions in this historical guide.

26 November 2012

.NET Caching - File Dependencies

Add a file dependency to .NET's MemoryCache with HostFileChangeMonitor, so cached file contents are invalidated when the source changes, without a restart.

26 September 2011

Memcached for C# - A Walkthrough

A C# Memcached walkthrough for sharing cached objects across applications and keeping them outside the IIS app pool, with setup and client examples.

14 September 2011

MVC Data URI HTML Helper

Build an ASP.NET MVC helper that embeds images as Base64 data URIs to avoid separate HTTP requests, with browser fallbacks and a look at the size tradeoff.

7 September 2011

Responsive Design and CSS3 Media Queries

How I redesigned this blog in 2011 with CSS3 media queries and Skeleton, letting one layout adapt to different screen sizes instead of separate mobile pages.

8 July 2011

MVC and the HTML5 Application Cache

A 2011 ASP.NET MVC experiment with HTML5 Application Cache, showing dynamic manifests, offline resources and the pitfalls of caching server-rendered pages.

24 June 2011

C# Parallel Invoke

Run independent C# methods concurrently with Parallel.Invoke, using lambda expressions and the Task Parallel Library instead of managing threads yourself.

15 April 2011

Microsoft Translator API

A 2011 C# example using Microsoft Translator's SOAP API to translate text and request spoken audio, with a service reference and a small wrapper class.

21 March 2011

Explicit Interface Usage in C#

Use explicit interface implementation in C# to make selected methods accessible through the interface, helping keep callers away from concrete class methods.

22 February 2011

Asp.net MVC HTML5 Toolkit - Latest Updates

An early MVC HTML5 Toolkit release added audio and video helpers, plus autofocus, readonly and disabled attributes to make richer MVC views easier to build.

9 February 2011

MVC 3 and Remote Validation

I must admit, I've been a bit of a slow starter when it comes to Asp.net MVC 3. I am an avid fan of MVC 2 and haven't really taken the time to look at MVC 3 until now. Wow - I am impressed though! There are a

24 January 2011

A Simple Guide to using OAuth with C#

Follow the original OAuth token exchange and signed API calls in this historical C# walkthrough, with a link to my newer OAuth 2.0 guide.

1 November 2010

Proxy Authentication - Helper Class

Handle HTTP 407 proxy authentication errors in a .NET application with a helper that checks connectivity, tries credentials and prompts users when needed.

28 October 2010

HTTP HEAD Request - Benefits / Usages

Use an HTTP HEAD request in .NET to check a resource and inspect its size or last-modified headers without downloading the body, saving unnecessary bandwidth.

6 October 2010

Object Caching - .NET 4

Store and retrieve objects with .NET 4's MemoryCache, using a small reusable wrapper to avoid repeated database calls and handle cache misses.

23 August 2010

MVC Experiment : An Alternative to Captcha

I'm sure most of you have at some point been exposed to a CAPTCHA control on the net. They come in loads of forms and are used to tell the difference between humans and computers (bots). If you have a website on the net, you are prone to lots

6 August 2010

Test your MVC routes with Moq

Test ASP.NET MVC routes with Moq by faking HTTP requests and checking controller, action and parameter values, catching broken mappings before they ship.

1 July 2010

HTML5 Input Types

My early exploration of HTML5 input types shows how native email validation, placeholders and form widgets can replace extra JavaScript and CSS.