URL size

U

UKuser

Hi,

I have a page where multiple fields can be edited:

Name Age DOB
[name1] [age1] [dob1]
[name2] [age2] [dob2]
[name3] [age3] [dob3]
[name4] [age4] [dob4]
[name5] [age5] [dob5]

Where you can type in any of the fields etc and with one click all
these get updated by Javascript concatenating them into one variable,
escaped and passed through GET.

However I've discovered that when there are LOTS of entries, I have a
problem - I.E. seems to restrict the length of a URL to 2KB whereas FF
appears to be much higher.

Is there an alternative way to somehow send this data to my PHP
script? Would POST face the same restrictions and is it better/worse
than using GET for AJAX?

Thanks

A
 
T

Thomas 'PointedEars' Lahn

UKuser said:
However I've discovered that when there are LOTS of entries, I have a
problem - I.E. seems to restrict the length of a URL to 2KB whereas FF
appears to be much higher.

Google for `IE OR "Internet Explorer" URL length'.
Is there an alternative way to somehow send this data to my PHP
script?
Yes.

Would POST face the same restrictions
No.

and is it better/worse than using GET for AJAX?

No.


PointedEars
 
B

Bart Van der Donck

UKuser said:
I have a page where multiple fields can be edited:

Name Age DOB
[name1] [age1] [dob1]
[name2] [age2] [dob2]
[name3] [age3] [dob3]
[name4] [age4] [dob4]
[name5] [age5] [dob5]

Where you can type in any of the fields etc and with one click all
these get updated by Javascript concatenating them into one variable,
escaped and passed through GET.

However I've discovered that when there are LOTS of entries, I have a
problem - I.E. seems to restrict the length of a URL to 2KB
Correct:
http://support.microsoft.com/kb/208427

whereas FF appears to be much higher.

Yes it is, but the official recommendation says:

| Servers should be cautious about depending on URI lengths above
| 255 bytes, because some older client or proxy implementations
| may not properly support these lengths.

http://www.ietf.org/rfc/rfc2068.txt
Is there an alternative way to somehow send this data to my PHP
script?

Yes, by using POST.
Would POST face the same restrictions and is it better/worse
than using GET for AJAX?

I don't believe POST has a limit on request size; but web server and/
or application may set their own rules. You can send both GET and POST
requests in AJAX.

Hope this helps,
 
U

UKuser

UKuser said:
I have a page where multiple fields can be edited:
Name Age DOB
[name1] [age1] [dob1]
[name2] [age2] [dob2]
[name3] [age3] [dob3]
[name4] [age4] [dob4]
[name5] [age5] [dob5]
Where you can type in any of the fields etc and with one click all
these get updated by Javascript concatenating them into one variable,
escaped and passed through GET.
However I've discovered that when there are LOTS of entries, I have a
problem - I.E. seems to restrict the length of a URL to 2KB
Correct:http://support.microsoft.com/kb/208427

whereas FF appears to be much higher.

Yes it is, but the official recommendation says:

| Servers should be cautious about depending on URI lengths above
| 255 bytes, because some older client or proxy implementations
| may not properly support these lengths.

http://www.ietf.org/rfc/rfc2068.txt
Is there an alternative way to somehow send this data to my PHP
script?

Yes, by using POST.
Would POST face the same restrictions and is it better/worse
than using GET for AJAX?

I don't believe POST has a limit on request size; but web server and/
or application may set their own rules. You can send both GET and POST
requests in AJAX.

Hope this helps,

Thanks to both replies. I did a quick bit of investigating and looks
like POST is the way to go!! Thanks A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top