Hi all,
I was just wondering how do sites for example facebook and twitter manage to get their search box's auto suggest / complete to know searches i made at previous time upon other sites and search engines?
Thank's in advance for any answers,
Jamie
23 Replies - 1550 Views - Last Post: 24 March 2011 - 05:45 PM
#1
How does twitter / facebook's search know searches i made from....
Posted 23 March 2011 - 09:56 PM
Replies To: How does twitter / facebook's search know searches i made from....
#2
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 06:12 AM
Searches that you've made in other sites and search engines? Please elaborate...
#3
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 09:13 AM
Say i search the word "internet" on google, when i then go on twitter and and start to type the same word it suggests my previous search on google.
It can't just be the fact that twitter have added the whole dictionary to the 'prediction' as if i miss-spell the word as "netinter" in google, search it then in twitter it will suggest "netinter" to me. or if i was to search on google, "online gaming sites" it will suggest this sentence to me on twitter.
Do they use and API from google to do this? or is it done in a more dynamic way? Would love to know as at the moment for search box's with auto suggest i'm typing in the whole dictionary, would love a 'smart' way of doing this with code so that it can remember users previous searches, but not only on our server, from others too...
Any ideas? cheers,
Jamie
It can't just be the fact that twitter have added the whole dictionary to the 'prediction' as if i miss-spell the word as "netinter" in google, search it then in twitter it will suggest "netinter" to me. or if i was to search on google, "online gaming sites" it will suggest this sentence to me on twitter.
Do they use and API from google to do this? or is it done in a more dynamic way? Would love to know as at the moment for search box's with auto suggest i'm typing in the whole dictionary, would love a 'smart' way of doing this with code so that it can remember users previous searches, but not only on our server, from others too...
Any ideas? cheers,
Jamie
#4
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 09:24 AM

POPULAR
Are you talking about the 'auto fill' ability of Internet Explorer? That's a browser specific ability not so much as collusion between sites.
Example:
http://windows.micro...s-automatically
Example:
http://windows.micro...s-automatically
#5
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 09:34 AM
modi123_1 hits the nail on the head. Some sites do have a auto-complete feature themselves made with AJAX/PHP/SQL(optional) but it cannot tell what you search for out of their domain.
This is an great resource for such scripts if you're interested
http://webtecker.com...e-ajax-scripts/
This is an great resource for such scripts if you're interested
http://webtecker.com...e-ajax-scripts/
#6
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 10:21 AM
I have already created a search box, that when you type in words it has a drop down list that gives suggestions using jQuery. The problem is at the moment the words it suggests have to be input manually in the script. example below...
The only way at the moment i have of providing suggestions is to type out the whole english dictionary, not very smart eh. Twitters, facebook, googles searches learn. They know what you have previously searched on other sites before hand.
I can understand how google do it, as i make most of my searches upon google so they just query their server for searches i have made previously upon google. However twitter and facebook know searches i made on google and have never made upon their sites, then suggest these in the drop down menu that i on my script have to manually add words too, how do they do this?
var suggestion = true; var suggestionText = "Suggested words i.e. apple, banana, carrot, donky"; var field = document.getElementById(id);
The only way at the moment i have of providing suggestions is to type out the whole english dictionary, not very smart eh. Twitters, facebook, googles searches learn. They know what you have previously searched on other sites before hand.
I can understand how google do it, as i make most of my searches upon google so they just query their server for searches i have made previously upon google. However twitter and facebook know searches i made on google and have never made upon their sites, then suggest these in the drop down menu that i on my script have to manually add words too, how do they do this?
#7
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 10:43 AM
First off - what browser are you using? I wasn't kidding around that IE saves your searches (or other form data) and attempts to give you options on what you wanted in a drop down for other similar boxes.
This might not be feasible - well at least in the way you are asking. To have cross site drop down you would almost need to write a new browser app all together. That or some way of quickly searing through your cached information.
This might not be feasible - well at least in the way you are asking. To have cross site drop down you would almost need to write a new browser app all together. That or some way of quickly searing through your cached information.
#8
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 10:55 AM
Chrome. I don't touch IE not a huge fan of it if i'm honest.
I didn't think it was feasible myself until i noticed it happening on twitter, which means it must be right? Maybe google have some kind of API you can use to achieve this? I know you can do it from previous searches upon your own site, but i didn't think you could from others?
Chrome also remembers form data and auto suggests when signing up to a site or logging into a site, this isn't the same for search box's though, unless you implement the "Google custom search" like here on DIC.
But twitter aren't using the google custom search box, and their search box is suggesting things to me that i have only ever searched on google, so it must be possible some home, but how? I'm clueless to that answer.
The only thing in my mind i can possibly think of is an api from google that remembers searches based upon an ip address? or some think to do with cookies?
I didn't think it was feasible myself until i noticed it happening on twitter, which means it must be right? Maybe google have some kind of API you can use to achieve this? I know you can do it from previous searches upon your own site, but i didn't think you could from others?
Chrome also remembers form data and auto suggests when signing up to a site or logging into a site, this isn't the same for search box's though, unless you implement the "Google custom search" like here on DIC.
But twitter aren't using the google custom search box, and their search box is suggesting things to me that i have only ever searched on google, so it must be possible some home, but how? I'm clueless to that answer.
The only thing in my mind i can possibly think of is an api from google that remembers searches based upon an ip address? or some think to do with cookies?
#9
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 11:27 AM
Yeah, and chrome also has the 'suggestion' autofill as well.
Here's how you turn it off:
http://www.google.co...8a5090ccf&hl=en
The typical way a suggestion 'auto fill' works in a browser is when a textbox is rendered and it has a name like 'search' or contains the word 'search' then it tries to auto fill it with what you had previously entered in in a similar box. basically if all the worlds apps had radically different names for their text boxes it wouldn't work. Thankfully most people label their controls in such a way they are readable. aka it's typical the word "search" is in a given textbox's name on various sites because that is the action of what the text box does.
This is purely an application/browser thing.
Here's how you turn it off:
http://www.google.co...8a5090ccf&hl=en
The typical way a suggestion 'auto fill' works in a browser is when a textbox is rendered and it has a name like 'search' or contains the word 'search' then it tries to auto fill it with what you had previously entered in in a similar box. basically if all the worlds apps had radically different names for their text boxes it wouldn't work. Thankfully most people label their controls in such a way they are readable. aka it's typical the word "search" is in a given textbox's name on various sites because that is the action of what the text box does.
This is purely an application/browser thing.
This post has been edited by modi123_1: 24 March 2011 - 11:28 AM
#10
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 11:44 AM
Yer, i understand how the browser suggests but it cant be this what is suggesting the results upon twitter. If i go on fairly badly constructed sites with basic search box's it won't suggest any results in the search box, only in the form registration / login area's unless they are using the "google custom search" but if i go on twitter it will suggest search results, ones that i have only made upon google. I have just had a look at twitter and it suggests previous searches i have made upon bing and yahoo too (just tried them out to rue out the google api idea)
It can't be the browser as this 'smart' search only works on websites with a huge budget for their systems, i.e twittwe, facebook, youtube (not surprising as they have access to googles information).
it can't be a google api as twitter is finding searches i have made from bing, yahoo and google. unless they all have api's you can implement?
So what is it? Does the search history your browser collects save into a cookie? and is there anyway to retrieve this information from that cookies using code?
I know you can use cookies to find some form history and to do other bit's and bobs upon a site, so is it some thing to do with them?
It can't be the browser as this 'smart' search only works on websites with a huge budget for their systems, i.e twittwe, facebook, youtube (not surprising as they have access to googles information).
it can't be a google api as twitter is finding searches i have made from bing, yahoo and google. unless they all have api's you can implement?
So what is it? Does the search history your browser collects save into a cookie? and is there anyway to retrieve this information from that cookies using code?
I know you can use cookies to find some form history and to do other bit's and bobs upon a site, so is it some thing to do with them?
#11
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 12:07 PM
Yes, yes it is. That's the whole point. The browser makes an educated guess that your data you typed in boxA of websiteZ is probably the same data you may want in boxDD of site123 based off the id and probably some shared information between companies (or looked up and dissected from webpages).
It is possible those crappy sites don't have their textboxes with similar names.
The information is saved in your past cached hits.
Hell 'search engine optimization' plugins take this to a new level as well.
It is possible those crappy sites don't have their textboxes with similar names.
The information is saved in your past cached hits.
Hell 'search engine optimization' plugins take this to a new level as well.
#12
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 12:18 PM
You do have a point there!
Surprised there is no way to access a users "cached hits" to find their history though. Must be a way to do it some how?
Any idea of the names of any SEO plugins?
Surprised there is no way to access a users "cached hits" to find their history though. Must be a way to do it some how?
Any idea of the names of any SEO plugins?
#13
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 12:22 PM
Quote
Surprised there is no way to access a users "cached hits" to find their history though. Must be a way to do it some how?
Are you talking about through a custom browser, plugin, or a javascript control?
Quote
Any idea of the names of any SEO plugins?
Bro, I am not a search engine; do the leg work yourself with a simple search.
#14
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 12:33 PM
jamiet, on 24 March 2011 - 08:18 PM, said:
Surprised there is no way to access a users "cached hits" to find their history though. Must be a way to do it some how?
No browser would expose sensitive data like that to 3'rd parties. Twitter has no business knowing what I typed into Google. Sure, the browser may show *me* previous Google input when I am using a similar input box on Twitter, but it won't allow Twitter that info.
Nor should it. Browsers need to respect user's privacy... to a degree.
#15
Re: How does twitter / facebook's search know searches i made from....
Posted 24 March 2011 - 12:48 PM
Javascript control fella.
Thought i would ask before searching for one in case you did know of a good seo plugin. Time to do the leg work i think.
Atli, i don't want to see this info, or know this info just for it to be implemented into a suggestion drop down area on my search box. no different to what google do themselves. Hardly "sensitive" data knowing what people search for, unless the person has some thing to hide....
Thought i would ask before searching for one in case you did know of a good seo plugin. Time to do the leg work i think.
Atli, i don't want to see this info, or know this info just for it to be implemented into a suggestion drop down area on my search box. no different to what google do themselves. Hardly "sensitive" data knowing what people search for, unless the person has some thing to hide....
|
|

New Topic/Question
Reply



MultiQuote







|