468,511 Members | 1,652 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,511 developers. It's quick & easy.

Trunkated URLs

Ok guys, I'm stumped.

I have an ASP page that converts the asp code in a form to html. It
then writes a VERY LONG URL and sends it to an email. I have it set
up to write to a link (so that the email isn't like a page long of
just a link) However, when it writes the URL, it trunkates it to a
certain length. Anyone know if there is a limit to the length of a
URL in an <a href.../a> tag?
Jul 20 '05 #1
2 2721
Crystal wrote:
I have an ASP page that converts the asp code in a form to html. It
then writes a VERY LONG URL and sends it to an email. I have it set
up to write to a link (so that the email isn't like a page long of
just a link) However, when it writes the URL, it trunkates it to a
certain length. Anyone know if there is a limit to the length of a
URL in an <a href.../a> tag?


It varies depending on the user agent, I don't think the specification
imposes any limit. Lots can't go above around 255 characters.

--
David Dorward http://david.us-lot.org/
Redesign in progress: http://stone.thecoreworlds.net/
Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/20...ces-ie-is-dead
Jul 20 '05 #2
Crystal wrote:
Ok guys, I'm stumped.

I have an ASP page that converts the asp code in a form to html. It
then writes a VERY LONG URL and sends it to an email.
Okay.

I have it set up to write to a link (so that the email isn't like a page
long of just a link)
I'm not sure what you mean by this.

However, when it writes the URL, it trunkates it to a
certain length. Anyone know if there is a limit to the length of a
URL in an <a href.../a> tag?


In terms of the URL, no, but you may wish to avoid long URLs anyway:

<URL:http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2.1>

It sounds like you don't have a problem with the URL per se, but rather a
problem with writing long strings into the mail (unless you have an unusual
setup, your mailing component won't try and parse URLs).

Firstly, depending on how you are sending the email (CDONTS?), word-wrapping
might occur. I can't remember if or how that can be disabled, check your
manual.

From that point, you have to deal with people who forward mails around.
Depending on the application, this may or may not be a problem. Use the
following syntax to get around it:

<URL:http://www.example.com/>

(I believe some clients prefer it with a space after the first colon, some
clients prefer it without, and some clients ignore it completely).

I think the problem is solved most easily by just creating a shorter link.
Can you put a redirector in the root directory of your website or
something?

--
Jim Dabell

Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

26 posts views Thread by Howard Brazee | last post: by
1 post views Thread by DM | last post: by
7 posts views Thread by AES | last post: by
10 posts views Thread by jflash | last post: by
9 posts views Thread by Salve =?iso-8859-1?Q?H=E5kedal?= | last post: by
3 posts views Thread by WebCM | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.