[Solved] Automatic generation of content-length header for CI views? |
[eluser]ch5i[/eluser]
Hello, I've been researching a caching issue lately (SSL, no-cache & IE) when I came across a nice caching tutorial by mark nottingham. There is one section about writing cache-aware scripts. In the last paragraph he recommends to generate Content-Length response headers: Quote:Generate Content-Length response headers. It’s easy to do, and it will allow the response of your script to be used in a persistent connection. This allows clients to request multiple representations on one TCP/IP connection, instead of setting up a connection for every request. It makes your site seem much faster. Sounds logical enough, but I'm not very familiar with the HTTP and TCP/IP nor with the internal workings of CI, so I can't really judge if this is worth implementing... Any opinions? Wikipedia says Quote:HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using the same TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair. and in Sun's Java Doc Quote:What makes a connection reusable? I guess in CI it could be done along these lines: Code: $length = ob_get_length(); I'm not very familiar with the internal workings of CI, but I guess the right place for something like this would be in the Loader library (Loader.php) somewhere around line 700? Code: /* br, Thomas |
Messages In This Thread |
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-10-2009, 11:24 AM
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-10-2009, 02:31 PM
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-11-2009, 03:34 AM
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-11-2009, 04:49 AM
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-11-2009, 04:53 AM
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-11-2009, 05:55 AM
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-11-2009, 12:04 PM
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-11-2009, 12:55 PM
[Solved] Automatic generation of content-length header for CI views? - by El Forum - 06-11-2009, 02:39 PM
|