Javascript bottleneck for server communication (for downloading resources)
<p>I'm writing a javascript application. In my application I want to create my own cache management.</p>

<p>Now my question is: Is there any bottleneck in javascript (e.g. any event on window object) that we can handle and modify all server communications?</p>

<p>many tags in the page can request a resource from server e.g. <code>img</code>, <code>link</code>, <code>script</code>.</p>

<p>In other words I want a bottleneck in javascript that I can be notified that a resource is requested from server. Then I will look into my cache-system and will serve the resource either from my cache or by downloading the content from a generic HTTP handler on my server.</p>

<p>I know it's a bit strange requirement but because I believe javascript is very flexible I though this "bottleneck" may exist.</p>

<p>Thank you.</p>
