3

Note: This is similar to this question, but I'm asking specifically about the use of facets.

I am working on re-implementing search functionality on a site for which search is quite important. There are tens of thousands of products, so faceting is a big part of how users search. There are dozens of properties that don't all apply at once. I do not expect users to bookmark the search, type it in directly, or interact with it as an API. My question is regarding the best practices when generating the URL, only insofar as they may see the URL in the address bar.

Consider that a user may choose to facet down to widgets that are red or green, supply 10A or 15A of power at 120V, are currently in stock, and contain "foobar". Currently, the URL looks like this:

https://www.example.com/search.aspx?q=foobar&num=30&start=0&fc=amps%3A10%7Camps%3A15&fc=color%3Ared%7Ccolor%3A&fc=volts%3A120&fc=instock%3Atrue

I could leave the URL structure as is, or do something like this:

https://www.example.com/search.aspx?q=foobar&num=30&start=0&color=red&color=green&amps=10&amps=15&voltage=120&instock=true

Alternatively, I could even do something like this, and disregard the user entirely:

https://www.example.com/search.aspx?q=foobar&num=30&start=0&f=Y29sb3I9cmVkJmNvbG9yPWdyZWVuJmFtcHM9MTAmYW1wcz0xNSZ2b2x0YWdlPTEyMCZpbnN0b2NrPXRydWU%3D

Are there any best practices or suggestions on how to format the facets in the URL, or thoughts on if the user actually cares about it in the first place?

1

I'd wager that most users don't look at it very often, and some never do, so overall this will have a minor effect on your users' experience. However, in cases where a user copy-and-pastes a link in an email or text message, they might be able to most quickly remember which search was which if they were seeing Option 2 of your three provided.

The reasoning was rather straightforward—the more readable it is for a user, the more useful it can potentially be:

Version:           1                           2              3
Human Readable:    Yes, but with difficulty    Yes, easily    No

...and that's about it, really.

Keep in mind that technically-proficient users could alter the URL directly to circumvent the UI and potentially create custom queries, that perhaps the tools on the site wouldn't allow, such as date ranges outside of a UI-restricted range. This may or may not be desirable, though server-side validation is effective with preventing this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.