How to turn ASP.NET pages into static pages as part of the build?
I have a few pages that are completely static. They only change at build time. But they are expensive to create. For the ones that are kind开发者_Go百科 of expensive to create, I cache them for very long times using the ASP.NET output caching. But for one page, I really want it cached forever and ever or until the the next build.
What is the most expedient way to make this happen? Is there a build in feature that achieves this or a third party tool?
(yeah, for the moment I plan to do the "view source" and copy paste thing, which isn't a very elegant build step)
Have you thought of setting content expiry for the browsers not to request this page again at all? You can append version number to the url so the page can be requested again after next build.
Give the page a .html extension, you can generate the .html using a T4 template
精彩评论