• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do I use POST variables or routed vars in URL?

#1
[eluser]luismartin[/eluser]
I'm implementing a form to search for products. The variables to be managed are like these: "product_type", "product_collection" (two nested levels of categories), "search_term", "offset", "per_page" (the last ones to manage pagination).

I'm not sure how to do it: whether to send them through POST, which means same URL for different results (this might be SEO unfriendly), or through routed variables as segments in the URL, which in turn would act like parameters in the controller. This one looks rather ugly to me, because if this is the URL structure:

products/display/[product_type]/[product_collection]/[search_term]/[offset]/[per_page]

what if I only want to filter by term to search? I use to do something like:

products/display/0/0/term-to-search

What do you think is a better approach to this question?


Messages In This Thread
Do I use POST variables or routed vars in URL? - by El Forum - 06-05-2012, 05:49 AM
Do I use POST variables or routed vars in URL? - by El Forum - 06-05-2012, 11:01 PM
Do I use POST variables or routed vars in URL? - by El Forum - 06-06-2012, 01:34 AM
Do I use POST variables or routed vars in URL? - by El Forum - 06-06-2012, 04:53 AM
Do I use POST variables or routed vars in URL? - by El Forum - 06-06-2012, 05:07 AM
Do I use POST variables or routed vars in URL? - by El Forum - 06-06-2012, 05:25 AM
Do I use POST variables or routed vars in URL? - by El Forum - 06-06-2012, 06:27 AM
Do I use POST variables or routed vars in URL? - by El Forum - 06-06-2012, 06:34 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.