Patent ID: 8850070

Claim:
A method for controlling by an intermediary via a policy engine injection of content into a response from a server to a request of a client, the method comprising: (a) receiving, by an intermediary, a response from a server to a request of a client; (b) determining, by a policy engine of the intermediary, the response matches a policy, the policy specifying content to insert into the response, the content identifying one or more variables provided by the intermediary; (c) determining, by the intermediary responsive to the policy, a first time of receipt or transmission of a first byte of the response and a second time of receipt or transmission of a last byte of the response; (d) modifying, by the intermediary, the response to insert, into the response, the content specified by the policy, the content inserted including a first variable and a second variable; (e) providing, by the intermediary, a first value of the first time of receipt of the first byte of the response for the first variable; (f) providing, by the intermediary, a second value of the second time of receipt of the last byte of the response for the second variable; and (g) transmitting, by the intermediary, the modified response to the client in response to the request, the modified response including the first time of receipt of the first byte of the response and the second time of receipt of the last byte of the response.