Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What are the issues between using pathinfo or query strings?

Posted on 1999-07-13
4
Medium Priority
?
160 Views
Last Modified: 2013-12-25
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!
0
Comment
Question by:taotree
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
mouatts earned 300 total points
ID: 1835058
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
 
LVL 8

Expert Comment

by:jhurst
ID: 1835059
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
 

Author Comment

by:taotree
ID: 1835060
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
 
LVL 11

Expert Comment

by:mouatts
ID: 1835061
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

Featured Post

Major Serverless Shift

Comparison of major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question