SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2007
    0 Post(s)
    0 Thread(s)

    Can I minimize the request header?

    I'm writing a web server and an Ajax-y web UI for an embedded system. My server is just plain dumb and quite resource constrained and right now I have code in the server to skip over all the POST header fields. I'd rather not use bandwidth to send them and CPU to skip them. Can I minimize my request header? I was looking to do something like:

    req = new xHttpRequest();
    for (f in req.header) {
      if (f != "Content-Type:') {
        req.header[f] = null;
    But I haven't found a reliable way to get the header fields. Maybe I haven't looked hard enough. Pointers...?

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Nelson BC
    0 Post(s)
    0 Thread(s)
    Don't think you can. Maybe you can set up something like this:

    Create a dummy page on the server to gather the request headers that were sent and make a note of them.

    In the ajax part, use the setRequestHeader method to set all headers that were sent to "" or null (not sure which would work).

    Use the dummy page again to see if it's still sending the headers or not.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts