开发者

Best HttpApplication event for altering the response source

开发者 https://www.devze.com 2023-01-15 15:08 出处:网络
I intend to build a HttpModule in order to scan a response\'s source and make sm开发者_如何学运维all adjustments, mainly altering urls (hrefs, actions, srcs, etc).

I intend to build a HttpModule in order to scan a response's source and make sm开发者_如何学运维all adjustments, mainly altering urls (hrefs, actions, srcs, etc).

I see the HttpApplication has a plethora of events that can be handled and I'm not sure of the best stage at which it's safe to alter the HTML content that goes back to the browser.

I need to do this in a HttpModule because this is an application-wide processing that spares me of writing the same code in every page.


You could use a response filter that you could attach during BeginRequest. And here's a nice video.

0

精彩评论

暂无评论...
验证码 换一张
取 消