Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Content-Length header

 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Content-Length for Ajax calls? Not sure what you are asking.

Eric
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65113
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a server-side php question -- not anything that has to do with JavaScript. Not many php programmers here that I know of.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65113
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay will ask over at the server side.Thanks alot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic