Forum Moderators: open

Message Too Old, No Replies

A technical Q surrounding links

max characters for href attribute

         

Mike12345

10:50 am on May 15, 2003 (gmt 0)

10+ Year Member



I was wondering if anyone could help with this question. Im not sure ths is the most appropriate forum for the Q.

How many characters can you have between ""'s in a href before it stops working?

Ive got a link with lots of characters between the "'s and its doesnt seem to be working, before i trim it i wanted to know if anyone could tell me what the limit is.

TIA :)

Mike12345

11:29 am on May 15, 2003 (gmt 0)

10+ Year Member



Any takers

Dreamquick

12:06 pm on May 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In theory the longest a URL can be is 1024 characters, including any querystring information.

Are you having problems getting a browser to follow the link or are search engines not following the link?

- Tony

Paul in South Africa

12:22 pm on May 15, 2003 (gmt 0)

10+ Year Member



This article [jetools.com] suggests that the limit varies depending on the browser and the server. It also suggests a limit of 255 characters because some proxy servers can assign arbitrary length restrictions on URLs.

Mike12345

12:25 pm on May 15, 2003 (gmt 0)

10+ Year Member



Ta Dreamquick and Paul,

basically when i click on the link it aint working, but there is way more than 1024 characters. Can you see anyway round it?

Eg, <"+" indicates "line break added to prevent side scroll">

<a href='javascript:checkItem2("product1", 0, 0, 0,+
document.itemsform.Field1_1.options[document.itemsform.Field1_1.selectedIndex].text,+
document.itemsform.Field1_2.options[document.itemsform.Field1_2.selectedIndex].text,+
document.itemsform.Field1_3.options[document.itemsform.Field1_3.selectedIndex].text,+
document.itemsform.Field1_4.options[document.itemsform.Field1_4.selectedIndex].text,+
document.itemsform.Field1_5.options[document.itemsform.Field1_5.selectedIndex].text,+
document.itemsform.Field1_6.options[document.itemsform.Field1_6.selectedIndex].text,+
document.itemsform.Field1_7.options[document.itemsform.Field1_7.selectedIndex].text,+
document.itemsform.Field1_8.options[document.itemsform.Field1_8.selectedIndex].text,+
"item1","item2",document.itemsform.Select1.value,document.itemsform.qty1.value);

javascript:checkItem2("product2", 0, 0, 0,+
document.itemsform.Field1_1.options[document.itemsform.Field1_1.selectedIndex].text,+
document.itemsform.Field1_2.options[document.itemsform.Field1_2.selectedIndex].text,+
document.itemsform.Field1_3.options[document.itemsform.Field1_3.selectedIndex].text,+
document.itemsform.Field1_4.options[document.itemsform.Field1_4.selectedIndex].text,+
document.itemsform.Field1_5.options[document.itemsform.Field1_5.selectedIndex].text,+
document.itemsform.Field1_6.options[document.itemsform.Field1_6.selectedIndex].text,+
document.itemsform.Field1_7.options[document.itemsform.Field1_7.selectedIndex].text,+
document.itemsform.Field1_8.options[document.itemsform.Field1_8.selectedIndex].text,+
"item3","item3",document.itemsform.Select1.value,document.itemsform.qty1.value);

javascript:checkItem2("product3", 0, 0, 0,+
document.itemsform.Field1_1.options[document.itemsform.Field1_1.selectedIndex].text,+
document.itemsform.Field1_2.options[document.itemsform.Field1_2.selectedIndex].text,+
document.itemsform.Field1_3.options[document.itemsform.Field1_3.selectedIndex].text,+
document.itemsform.Field1_4.options[document.itemsform.Field1_4.selectedIndex].text,+
document.itemsform.Field1_5.options[document.itemsform.Field1_5.selectedIndex].text,+
document.itemsform.Field1_6.options[document.itemsform.Field1_6.selectedIndex].text,+
document.itemsform.Field1_7.options[document.itemsform.Field1_7.selectedIndex].text,+
document.itemsform.Field1_8.options[document.itemsform.Field1_8.selectedIndex].text,+
"item4","item5",document.itemsform.Select1.value,document.itemsform.qty1.value);'>blaa blaa</a>

Am i crazy?, and yes this is necessary.

<added>To Clarify: Im not getting "page cannot be displayed" it just aint following it. But if you take out the last part of script bit it wokrs, presumabably cos it brings belwo the max.</added>

[edited by: tedster at 4:37 pm (utc) on May 15, 2003]

BlobFisk

1:07 pm on May 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could you include a lot of the recurring form value calls into your script, or create a seperate script function for each link to avoid having to put all of this information in the link tag?

edit_g

3:28 pm on May 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



tinyurl.com? ;)

g1smd

7:03 pm on May 15, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Shorter variable names?