开发者

Displaying page response time and AJAX request response times with Rack middleware

I want to write a piece of Ra开发者_开发问答ck middleware that will display the response time for rendering the page, as well as the response times for any AJAX requests made on the page. What's the best way to go about doing this?


You can try something based on this railscast. It injects response times as HTML comments into your page source. For AJAX requests, you can inspect the content-type/x-requested-with headers to inject the timing information in the appropriate format.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜