Forum Moderators: coopster

Message Too Old, No Replies

Pros/ Cons of passing parameters in URL

Search Engine Optimization, Hackers, Spiders

         

cl328

5:32 pm on Dec 7, 2004 (gmt 0)

10+ Year Member



Hello,

I looked, but couldn't find anything on this concept.

Question: What are the pros and cons of passing parameters in a URL with dynamic PHP pages?

What is the worse thing than can happed?

My thoughts:
Cons:
1) exposing DB values or Fields, etc
2) URL looks bad
3) some search engines might not follow it
4) give to much information and a Hacker might do something harmful?

Pros:
1) maybe easier to code (problably not)
2) you can email links to people to see the dynamic data (BIG PLUS)
3) you can make search engines follow the link (BIG PLUS) as some spiders can follow it
4) your website might look bigger, as in more pages than it really is

So, do the positives out weigh the negatives?
Or are my pros/cons NOT CORRECT/ ACURRATE

any replies are MUCH APPRECIATED... as I need to develop a site ASAP!

thanks!

cl328

5:35 pm on Dec 7, 2004 (gmt 0)

10+ Year Member



forgot to mention...
The dynamic data I'm thinking about passing parameters in the URL is for generic, general data.

Not personal information

jatar_k

6:06 pm on Dec 7, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I agree with your cons, I will also add

5) users will never be able to remember or type in your url

I will address your pros
1) probably not
2) irrelevant, this will be the case also if you use static urls, they will still be able to see dynamic data. You don't have to have a query string for dynamic data to be acheived.
3) uhh, say what?

>> you can make search engines follow the link (BIG PLUS) as some spiders can follow it

so you only want some spiders to follow it? How about we go with a static seeming url that all spiders can follow and users can easily relate to.

4) IMO it looks smaller as you are actually pushing everything through a single template page.

I have always been a very strong believer in NO QUERY STRINGS! unless it is a garbage page that has no value, though even that is hard to assess so let's say a non spiderable page.

One of my biggest pet peeves, this is in no way directed at you cl328 but it seems to be everyone's excuse.

When a programmer tells me they built a huge site wiht big nasty query strings because it was easier to code. If they worked for me I would fire them. So, though ease of update is something to be concerned with, any roadblocks to search engine marketing are absolutely unacceptable.

So, building it with out query strings is one option and the other is to use mod_rewrite on your query strings to make the urls all appear static.

this thread talks about CMS systems [webmasterworld.com] and relates to some of the issues. Take a specific look at msg 7 and 8.

cl328

7:07 pm on Dec 7, 2004 (gmt 0)

10+ Year Member



THANKS jatar_k!

Thanks for informing me of the things I forgot.

So... <I just proved it>... I think the reasons why programmers use the URLs for parameters, etc... IS because they KNOW how to do that... its easy and they have done it many times in the past.

BUT using something new, something better... they have to learn again :)
(they then are lazy)

Ironic... I have a site with mod-rewrite, but don't know a lot about it or its limitations or easy of use or what can be done with it.

Do you have a link to inform me of the details or at least somewhere where I can read about "what all can be done with mod-rewrite?"

I've read the apache site... BUT man, that crap is way over my head... it says a lot of stuff I don't konw what it means or how to use it :)

THanks

PS. Question: a planning question:

I have my database with all good content, etc.
I have my website working the way I want it.

NOW...I want to make the info in the DB accessible to search engines... Is this something I need to address why planning the site OR can I do it as an extra feature of the site? THis goes with the above where I said... Not sure of the limitations, etc. of mod rewrite.

THANKS AGain!

jatar_k

7:34 pm on Dec 7, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



An Introduction to Redirecting URLs on an Apache Server [webmasterworld.com]

>> Is this something I need to address while planning the site

most definitely, if everything works as is right now then look at a good rewrite system. If you are planning a site then it must be incorporated in it's design.

A site that doesn't rank, doesn't get traffic and doesn't survive long. ;)

ergophobe

2:24 am on Dec 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



First, I would say that whether you rewrite the URLs or not, you are passing parameters in the URL. Presentation is a separate issue from function. So I interpreted the question as being one of passing information via the URL versus using cookies or POST. It seems that's not what the OP meant, but...

Pros of passing parameters in URLs

1. Users can bookmark the pages
2. You can do redirects without cURL and such

Cons
1. You can only pass small amounts of text data.