Support deferred script.
Fix interaction between caching and proxying.