{"id":1591,"date":"2011-02-23T13:11:10","date_gmt":"2011-02-23T19:11:10","guid":{"rendered":"http:\/\/bililite.nfshost.com\/blog\/?p=1591"},"modified":"2011-02-23T15:33:22","modified_gmt":"2011-02-23T21:33:22","slug":"a-google-bug","status":"publish","type":"post","link":"https:\/\/bililite.com\/blog\/2011\/02\/23\/a-google-bug\/","title":{"rendered":"A Google Bug (no, not really)"},"content":{"rendered":"<p>For the search on the <a href=\"http:\/\/youngisrael-stl.org\">Young Israel<\/a> site, I use Google with a form that creates links like <code>http:\/\/www.google.com\/search?q=foo&sitesearch=http:\/\/youngisrael-stl.org<\/code> to limit the search to the one site. It works fine in normal browsers, but on my iPhone it detects the browser and changes it to a mobile-optimized site that ignores the <code>sitesearch=http:\/\/youngisrael-stl.org<\/code> and returns results for the whole web. <code>http:\/\/www.google.com\/search?q=foo+site:youngisrael-stl.org<\/code> works fine, but I can't make an HTML form add the <code>site:<\/code> term automatically. A workaround would be to make my own page on the server that mangles the query string and changes <code>Location<\/code>, but I'm not sure it's worth the effort. I'll see how many complaints I get.<\/p>\r\n<p><strong>Addendum, later the same day<\/strong>: It looks as though Google isn't supporting the <code>sitesearch<\/code> query at all; it was <a href=\"http:\/\/googlecode.blogspot.com\/2010\/11\/introducing-google-apis-console-and-our.html\">deprecated<\/a> a few months ago. The fact that it still sometimes works is just a lucky coincidence. They use \"<a href=\"http:\/\/www.google.com\/cse\/manage\/create\">Custom Searches<\/a>\" now, and <a href=\"http:\/\/www.darrenhoyt.com\/2007\/09\/15\/build-a-simpler-google-search-form\/#comment-1197\">this wise person<\/a> figured out how to use it with forms rather than javascript. So that's what I'm using now. It serves ads at the top of the page, but I'm too cheap to pay for the <a href=\"http:\/\/www.google.com\/sitesearch\/\">ad-free version<\/a>.<\/p>\r\n<p>The <a href=\"http:\/\/www.google.com\/cse\/docs\/resultsxml.html\">documentation for the query parameters<\/a> is pretty complete, and it looks as though you could create a \"generic\" all-web custom search then use the parameters to limit it programmatically. Unfortunately, it looks as though the XML\/JSON data is only available to paying customers.<\/p>","protected":false},"excerpt":{"rendered":"For the search on the Young Israel site, I use Google with a form that creates links like http:\/\/www.google.com\/search?q=foo&#038;sitesearch=http:\/\/youngisrael-stl.org to limit the search to the one site. It works fine in normal browsers, but on my iPhone it detects the browser and changes it to a mobile-optimized site that ignores the sitesearch=http:\/\/youngisrael-stl.org and returns results [&hellip;]","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/1591"}],"collection":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/comments?post=1591"}],"version-history":[{"count":6,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/1591\/revisions"}],"predecessor-version":[{"id":1603,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/posts\/1591\/revisions\/1603"}],"wp:attachment":[{"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/media?parent=1591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/categories?post=1591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bililite.com\/blog\/wp-json\/wp\/v2\/tags?post=1591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}