Question

Is there any microformat/standard for implementing search form on the site?
(access keys, naming etc.)

Any good practices?

Was it helpful?

Solution

The only things I can think of are that searches should be GET requests, and that you may want to implement a RESTful API that allows developers to query JSON and XML results in addition to HTML

If you are trying to implement a plugin for browsers like IE and Firefox to allow for search/autocomplete in the search box of the browser, check out this: https://developer.mozilla.org/en/creating_opensearch_plugins_for_firefox

OTHER TIPS

Here are some conventions I follow. Forgive me if these are not exactly on topic with microformats, or "technically not" in the way I describe the various parts to my answer.

I have found validation in these few standards I've copied from others:

HTML form ID = "search"

Action URL for the form is //root-of-site/search/

Search Results URL construct:

//root-of-site/search?q=queryClause1+Clause2&AnotherParamName=foo

[personally that structure bugs me a little because search-forward-slash appears to be a directory, and the search-question-mark looks like a page taking a query string, and IMO a page should have a suffix. I've been tempted to use search.cgi or search.app, but I see the big guys using /search?q= and so it is]

ID of search query is "q" (this is nearly universal in adoption)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top