Hacker News new | past | comments | ask | show | jobs | submit login

Hi there Andrew, I'm the author. After reading the comments on HN and elsewhere, I'm surprised to see my hack being praised for it's simplicity. If I had more time last night, I would have implemented more features - I have a ton of ideas.

I guess it's good that I didn't. It looks like simplicity won.




Speed it up by not going through your server to get the query suggestions. You can drop the jsonp parameter and just eval the results. Or change the jsonp parameter and include it as a script tag.


I'm now doing everything client-side using JQuery and <script> tags to get around cross-___domain XHR limitations. Now Google can't block it. :)


I'm curious: how do you get around crossdomain XHR limitations using <script> tags? Thanks!


<script> tags aren't subject to cross-___domain restrictions. Think about it - all those website statistics scripts are hosted on external servers, but their Javascript gets executed just fine. By dynamically inserting <script> tags into the page, you can force Javascript from another ___domain to execute in your ___domain.


Got it, thanks. I finally got around to learning JSONP.

JQuery's $.ajax API handles it automatically for you too (if you use the 'jsonp' or 'script' dataType options), which is very nice.


They can block by referer, of which your ___domain is. Though I doubt they would.


Considering they offered him a job (http://news.ycombinator.com/item?id=1680265), I don't think they'll block it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: