Log in

No account? Create an account

Thu, Feb. 14th, 2008, 05:19 pm
What Do I Do Now?

I'm a little discombobulated at the moment for various reasons but this idea popped in to my head and I have no idea how stupid it is. What better to test than to fling it the internet like so much poop and see if it sticks.

Imagine if sites had a

<meta name="searchurl" value="http://example.com/search?query=%q" />[1]

tag in their headers. This would allow agents to autodiscover and utilise a site's search engine if one was available simply by substituting %q for a url encoded query. There could even be a type="..." attribute that gave the mime type of the results - Atom would be good. Although that could just as easily be done with Accept headers and the other standard mechanisms for negotiating types.

Search engines could even use it to get better results from stuff like shopping and review sites.

Of course there's a possibility (nay, a probability even) that it'd be co-opted by spammers and also you have to ask yourself - why would sites provide this as a service and who would want to use it anyway so it's probably one for the "WTF were you thinking" file but hey ho.

I need more tea.

[1] Although it occurs to me that

<link rel="alternative" name="search" href="..." />

might work even better.

Thu, Feb. 14th, 2008 05:56 pm (UTC)

Seems like that might be cool as an OpenSearch shortcut. So supporting clients would read:

<link rel="search"
      title="Example.com Search"
      href="http://example.com/search?q={searchTerms}" />


<link rel="search"
      href="http://example.com/osd.xml" />

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  <ShortName>Example.com Search</ShortName>
  <Description>Use Example.com to search the Web.</Description>
  <Url type="application/atom+xml"

Thu, Feb. 14th, 2008 06:37 pm (UTC)

Doh, I should have guessed somebody else would have come up with this.

The thing is I probably read about OpenSearch but for the life of I was completely blanking on it.

I blame the lack of sleep.

Thu, Feb. 14th, 2008 07:00 pm (UTC)

I don't blame you! It hasn't really caught on yet, though I'd like to do some cool things with it in MT, some time.

Thu, Feb. 14th, 2008 11:30 pm (UTC)

and firefox understands this and turns the search icon blue to tell you there is a search you can add to your search box. openguides does this automagically.