Link to home
Start Free TrialLog in
Avatar of taotree
taotree

asked on

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!
ASKER CERTIFIED SOLUTION
Avatar of mouatts
mouatts

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhurst
jhurst

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?...
Avatar of taotree

ASKER

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.
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