With reference to this serverfault blog post: A Few Speed Improvements where it talks about how static content for stackexchange is served from a separate cookieless domain...
How would someone go about doing this on IIS7.5 for a ASP.NET MVC site?
The plan so far:
- Register domain eg static.com, create a new website in IIS
- Manually copy the js / css / images folders from MVC as is so that they have the same paths on the new server
- Enable IIS gzip settings (js/css = high compression, images = none)
- Set caching with far future expiry dates
<clientCache cacheControlCustom="public" />in the web.config
- Never set any cookies on the static.com site
- Combine and minimize js / css
- Auto deploy changes in static content with WebDeploy
Is this plan correct?
And how can you use WebDeploy to deploy the whole web app to one server and then only the static items to another?
I can see there is a similar question, but for apache: Creating a cookie-free domain to serve static content so it doesn't apply