Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Response.Flush doesn't initiate Chunked Transfer Encoding

$
0
0

I have a Classic ASP application written in VBScript, running on IIS7.5. Some pages can be fairly large (1MB uncompressed), and take a little time to render due to the associated DB query and time to write out all the result rows (up to 500). I wanted to see if I could speed up the perceived performance of these pages by enabling Chunked Transfer Encoding. So, every 50 rows, I call response.flush, expecting IIS to send that chunk onto the browser while the next batch is rendering.

For performance, we have both static and dynamic compression turned on. We also use the IIS rewrite module for incoming rules, and a single outgoing rule to rewrite all cookies to be HttpOnly.

While my content is coming back gzip'ed, unfortunately it does not appear to use CTE and comes back at all once. Here are the headers according to Fiddler:

GET /list.asp HTTP/1.1
Host: <host>
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; Charset=windows-1252
Content-Encoding: gzip
Expires: 0
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Date: Thu, 13 Dec 2012 22:37:10 GMT
Connection: close

Does anyone have any ideas on why this isn't chunking? I've confirmed the chunkedTransfer setting is set to True for ASP, and I can see IIS uses CTE when I request a large (4MB) text file.

Also, on a slightly related note, why is ASP adding in the Connection: close header on the response? I'm not explicitly calling response.end, and I'd like for the connection to be reused for subsequent static content requests if possible.



Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>