This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Content-Length header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Content-Length header" Watch "Content-Length header" New topic
Author

Content-Length header

Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 598

Hi all,

What is the best way to go about setting Content-Length headers in php/javascript,considering that the Content-Length needs to be calculated in some manner?

Thank you


===>SCJP 1.5(72%)<===
==>SCWCD1.5(76%)<===
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Content-Length for Ajax calls? Not sure what you are asking.

Eric
Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 598

Well I read that if I set the content-length header for all my responses,then HTTP1.1 will maintain a persistent TCP/IP connection granting me performance bonuses,especially over secure connections.

So I interpreted this as:

For all my php scripts I must calculate and set the Content-Length header so that I can gain performance increases....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60806
    
  65

That's a server-side php question -- not anything that has to do with JavaScript. Not many php programmers here that I know of.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You might get a better response at
http://www.codingforums.com
in there php section on the content-length question.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60806
    
  65

The web-dev sections of the macrumors forums are also heavily php-centric as well (since OS X comes with Apache and php configured out of the box).
Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 598

Okay will ask over at the server side.Thanks alot
 
Don't get me started about those stupid light bulbs.
 
subject: Content-Length header
 
Similar Threads
Accessing Java HttpServer from PHP;
Not showing up pdf
Sending a photo through a Servlet.
FOP example servlet is a flop
how to find the size of web page