SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Mar 5, 2007, 09:29 #1
- Join Date
- Feb 2007
- Posts
- 42
- Mentioned
- 0 Post(s)
- Tagged
- 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:
Code:req = new xHttpRequest(); for (f in req.header) { if (f != "Content-Type:') { req.header[f] = null; } }
-
Mar 5, 2007, 10:18 #2
- Join Date
- Nov 2004
- Location
- Nelson BC
- Posts
- 2,310
- Mentioned
- 0 Post(s)
- Tagged
- 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.
Bookmarks