Simplifying complex contexts/urls
I'm developing a site with Zope that has a lot of interlinking between objects, and after clicking around for a while, the context (aka, the url path in the browser's address display) gets really long and complex. So far, I haven't had any problems with it, but I do have two concerns. 1. It starts to look pretty ungainly. This doesn't bother me too much, but I don't know how users will respond. 2. There must be some limit on the length of the allowable url in the browser's display. What are the chances that an extended session of clicking around will run into that limit? So, I'm wondering if there's some way to automatically simplify a path to its most elemental form. For example, www.mysite.edu/main/topicA/topicB/topicC/topicA/topicB becomes www.mysite.edu/main/topicA/topicB. Thanks. Chris
Chris Fassnacht wrote:
I'm developing a site with Zope that has a lot of interlinking between objects, and after clicking around for a while, the context (aka, the url path in the browser's address display) gets really long and complex. So far, I haven't had any problems with it, but I do have two concerns.
1. It starts to look pretty ungainly. This doesn't bother me too much, but I don't know how users will respond.
2. There must be some limit on the length of the allowable url in the browser's display. What are the chances that an extended session of clicking around will run into that limit?
Who knows? I don't think the HTTP spec has a limit on URL length, it's probably implimentation defined.
So, I'm wondering if there's some way to automatically simplify a path to its most elemental form. For example, www.mysite.edu/main/topicA/topicB/topicC/topicA/topicB becomes www.mysite.edu/main/topicA/topicB.
In your app, they may produce the same results, but these are two different scenarios. These requests both have different 'acquisition paths' which will cause different things to happen (for example, even though two images may be the same image in the two paths, they would both have different absolute_url values, because absolute_url is built from the acquisition path). I would suggest not allowing your application to build such complex queries if they are essentialy redundant and you are not using any particular feature that redundent paths give you (I can't think of one off the top of my head...). You might end up in a situation like: http://www.mysite.com/main/topicA/topicA/topicA/topicA/... Which can happen, but only if you build your app to 'leak' path elements. -Michel
Michel, Thanks for the advice. I finally figured out how to stop my "leaking" with the judicious use of the <dtml-var BASE> tag in my path generating statements. I probably should have figured this out myself before posting to the list. Sorry to be asking such elementary questions. Chris
-----Original Message----- From: michel@localhost.localdomain [mailto:michel@localhost.localdomain]On Behalf Of Michel Pelletier Sent: Monday, September 13, 1999 6:09 PM To: cfassnacht@ssc.wisc.edu Cc: zope@zope.org Subject: Re: [Zope] Simplifying complex contexts/urls
Chris Fassnacht wrote:
I'm developing a site with Zope that has a lot of
interlinking between
objects, and after clicking around for a while, the context (aka, the url path in the browser's address display) gets really long and complex. So far, I haven't had any problems with it, but I do have two concerns.
1. It starts to look pretty ungainly. This doesn't bother me too much, but I don't know how users will respond.
2. There must be some limit on the length of the allowable url in the browser's display. What are the chances that an extended session of clicking around will run into that limit?
Who knows? I don't think the HTTP spec has a limit on URL length, it's probably implimentation defined.
So, I'm wondering if there's some way to automatically simplify a path to its most elemental form. For example, www.mysite.edu/main/topicA/topicB/topicC/topicA/topicB becomes www.mysite.edu/main/topicA/topicB.
In your app, they may produce the same results, but these are two different scenarios. These requests both have different 'acquisition paths' which will cause different things to happen (for example, even though two images may be the same image in the two paths, they would both have different absolute_url values, because absolute_url is built from the acquisition path).
I would suggest not allowing your application to build such complex queries if they are essentialy redundant and you are not using any particular feature that redundent paths give you (I can't think of one off the top of my head...). You might end up in a situation like:
http://www.mysite.com/main/topicA/topicA/topicA/topicA/...
Which can happen, but only if you build your app to 'leak' path elements.
-Michel
On Mon, 13 Sep 1999 19:09:16 -0400, you wrote:
2. There must be some limit on the length of the allowable url in the browser's display. What are the chances that an extended session of clicking around will run into that limit?
Who knows? I don't think the HTTP spec has a limit on URL length, it's probably implimentation defined.
Only 256 characters is _guaranteed_, but you seem to be able to get away with quite a bit more. My only other data point is that Internet Explorer is unhappy after about 2000 characters. My current project is likely to be pushing this limit, so I would be interested if anyone has seen anything lower. http://www.zope.org/Members/htrd/urllen contains a quick test. Thanks, Toby Dickenson
i'm very happy to report that in the end good old KFM (the KDE file manager with built-in browser functionality) prevailed and when i tried again after the URL had gotten to 4137 characters i am getting: *************************** Request-URI Too Large The requested URI's length exceeds the capacity limit for this server. request failed: URI too long -------------- Apache/1.3.4 Server at www.zope.org Port 80 ***************************** i hope it didn't crash anything... ;) jens Jens Vagelpohl Systems Administrator Washtenaw Development Council
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Toby Dickenson Sent: Wednesday, September 15, 1999 17:00 To: cfassnacht@ssc.wisc.edu Cc: zope@zope.org Subject: Re: [Zope] Simplifying complex contexts/urls
On Mon, 13 Sep 1999 19:09:16 -0400, you wrote:
2. There must be some limit on the length of the allowable url in the browser's display. What are the chances that an extended session of clicking around will run into that limit?
Who knows? I don't think the HTTP spec has a limit on URL length, it's probably implimentation defined.
Only 256 characters is _guaranteed_, but you seem to be able to get away with quite a bit more.
My only other data point is that Internet Explorer is unhappy after about 2000 characters. My current project is likely to be pushing this limit, so I would be interested if anyone has seen anything lower. http://www.zope.org/Members/htrd/urllen contains a quick test.
Thanks,
Toby Dickenson
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
from ZServer on Linux with Netscape or KDE browser I got up to 131,111 with no prob. The next click 2x131,111 crashes both.. (KDE doesn't like rendering the lonnnnggggggg link, had to refresh the display each time) Yahoo use to give thousands of stock quotes back from their quote page, the URL had each stock symbol,another, now they limit it to 200. I ran into IE's url length limit trying that once, so someone should check IE out and report back. David, tone.. Jens Vagelpohl wrote:
i'm very happy to report that in the end good old KFM (the KDE file manager with built-in browser functionality) prevailed and when i tried again after the URL had gotten to 4137 characters i am getting:
*************************** Request-URI Too Large
The requested URI's length exceeds the capacity limit for this server.
request failed: URI too long
--------------
Apache/1.3.4 Server at www.zope.org Port 80 *****************************
i hope it didn't crash anything... ;)
jens
Jens Vagelpohl
Systems Administrator Washtenaw Development Council
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Toby Dickenson Sent: Wednesday, September 15, 1999 17:00 To: cfassnacht@ssc.wisc.edu Cc: zope@zope.org Subject: Re: [Zope] Simplifying complex contexts/urls
On Mon, 13 Sep 1999 19:09:16 -0400, you wrote:
2. There must be some limit on the length of the allowable url in the browser's display. What are the chances that an extended session of clicking around will run into that limit?
Who knows? I don't think the HTTP spec has a limit on URL length, it's probably implimentation defined.
Only 256 characters is _guaranteed_, but you seem to be able to get away with quite a bit more.
My only other data point is that Internet Explorer is unhappy after about 2000 characters. My current project is likely to be pushing this limit, so I would be interested if anyone has seen anything lower. http://www.zope.org/Members/htrd/urllen contains a quick test.
Thanks,
Toby Dickenson
On Wed, 15 Sep 1999, Toby Dickenson wrote:
http://www.zope.org/Members/htrd/urllen contains a quick test.
I just tried this out. At 4137 characters long, it was ok. Clicking on the next page, the error message was "UTL is too long. The Requested URL's length exceeds the capacity limit for this server." xan jonathon
participants (6)
-
Chris Fassnacht -
David Kankiewicz -
htrd90@zepler.org -
Jens Vagelpohl -
jonathon -
Michel Pelletier