What are the issues between using pathinfo or query strings?

I'm running some dynamic contect and am wondering what are the issues between using URLs like:

http://domain.com/cgi-bin/something.cgi/help/me/id/whatever

and:

http://domain.com/cgi-bin/something.cgi?1=help&2=me&id=id&last=whatever

Or the mixed:

http://domain.com/cgi-bin/something.cgi/whatever?hello=again

Are there any performance, cacheing, browser issues with doing it one way over the other?

Thanks!
taotreeAsked:
Who is Participating?
 
mouattsConnect With a Mentor Commented:
Generally I would suggest there are no real issues.

In performance terms there is no difference.
In terms of caching there is no real difference either as the path_info is only known on the server side. A Browser and a Proxy just look at the whole URL.
Having said that I recall that IE3 looks at the extension of the URL determining whether to cache the page or not when no other directive exists. Consequently when extra path_info is used IE3 no longer understands the extension and will not cache the page.
I'm not sure if there are any real differences so far as AutoComplete is concerned but I can think of no other browser issues.

If there is any real issue it is that in using the mixed method you are complicating the CGI variable extraction but once written this is solved and the advantages that you gain using the mixed method may justify the additional complexity.

Probably the biggest draw back is that if the name value pair method is used it is simple to use this for both GET and POST (ie within FORMs) however if you want to change part of the path_info within a form then it is much trickier to do and you need to rely on javascript.

HTH
Steve
0
 
jhurstCommented:
There is actually one difference, those browsers that use the file name to dermine the file type/helper application will see the .cgi in the case where that is the last thing before the ? and nothing where you use the /whatever?...
0
 
taotreeAuthor Commented:
Thanks for the info.

jhurst: I don't believe that is correct--The server uses the file extension to determine a mime-type and the mime-type is sent to the browser. The browser then uses that mime-type to decide the filetype/helper app, not the original extension. I don't know if there are any browsers that don't follow this, but I'm fairly sure this is true of at least netscape.
0
 
mouattsCommented:
Browsers do not use the extension to determine help apps etc but the mime type that is issued by the server. There is one exception to this which is that IE will look at the extension (and possibly Netscape) when the file is loaded locally. But this is not going to be a problem when using path_info as you always need a server to make sense of them.

Steve
0
All Courses

From novice to tech pro — start learning today.