30. A computer storage medium encoded with a computer program, the program comprising instructions that when executed by a data processing apparatus cause the data processing apparatus to perform operations comprising: receiving at a client device a dictionary defining query triggers, each of the query triggers being one or more terms; in response to rendering a webpage at the client device, searching the webpage for the query triggers; for each query trigger identified in the webpage, calculating at the client device a rank score for the query trigger based on attributes of the query trigger wherein the attributes of the query trigger include one or more of: a context of the query trigger defined by a display format of the query trigger in the resource; a frequency of occurrence of the query trigger in the resource; and a length in characters of the query trigger; and wherein calculating at the client device a rank score for the query trigger based on attributes of the query trigger comprises generating the rank score based on a function of one or more of the context of the query trigger, the frequency of occurrence of the query trigger, and the length of the query trigger; ranking at the client device the query triggers according to the rank scores; generating at the client device search query suggestions from the query triggers identified in the resource; and presenting at the client device the search query suggestions according to the ranking of the query triggers.
30. A computer storage medium encoded with a computer program, the program comprising instructions that when executed by a data processing apparatus cause the data processing apparatus to perform operations comprising: receiving at a client device a dictionary defining query triggers, each of the query triggers being one or more terms; in response to rendering a webpage at the client device, searching the webpage for the query triggers; for each query trigger identified in the webpage, calculating at the client device a rank score for the query trigger based on attributes of the query trigger wherein the attributes of the query trigger include one or more of: a context of the query trigger defined by a display format of the query trigger in the resource; a frequency of occurrence of the query trigger in the resource; and a length in characters of the query trigger; and wherein calculating at the client device a rank score for the query trigger based on attributes of the query trigger comprises generating the rank score based on a function of one or more of the context of the query trigger, the frequency of occurrence of the query trigger, and the length of the query trigger; ranking at the client device the query triggers according to the rank scores; generating at the client device search query suggestions from the query triggers identified in the resource; and presenting at the client device the search query suggestions according to the ranking of the query triggers. 31. The computer storage medium of claim 30 , wherein: the query triggers include expansion terms, the expansion terms for each query trigger being terms that are query expansions of the one or more terms of the query trigger; and identifying the query triggers in the resource comprises searching the resource for the query triggers included in the dictionary; and generating search query suggestions from the query triggers comprises generating for a query trigger identified in the resource a search query that includes an expansion term of the query trigger.