svn: /web/php/branches/PROTOTYPE_2010/ css/structure.css css/theme.css index.html js/common.js js/jquery.autocomplete.pack.js js/search-index-en.js
| From: | Stewart Lord | Date: | Sat, 19 Dec 2009 19:57:58 +0000 |
| Subject: | svn: /web/php/branches/PROTOTYPE_2010/ css/structure.css css/theme.css index.html js/common.js js/jquery.autocomplete.pack.js js/search-index-en.js | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-6800@lists.php.net to get a copy of this message | ||
stewartlord Sat, 19 Dec 2009 19:57:58 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=292336
Log:
Implemented search auto-complete.
The auto-completing search feature uses the popular
jquery.autocomplete plugin:
http://docs.jquery.com/Plugins/Autocomplete
The auto-complete data set is held client-side. This
incurs one http request to load the search index when
the page is loaded (via jQuery.getScript()), thereby
avoiding additional requests as the user types in the
search field. This makes the auto-complete feature
very responsive.
The search index file defines a 'searchIndex' array
containing the name and page (filename) of each entry
in the manual. The file is 382 KB uncompressed. Gzip
compression (via the cli) reduces this to 53 KB. Proper
configuration of server-side compression and expire
headers should make this download relatively painless.
The search index file resides under the js folder
and is named: 'search-index-<lang>.js'. There is only
one index file at this time ('en') and it was manually
generated.
The auto-complete feature has one major short-coming;
the results are not sorted/ranked by relevance. This
will required modification of the auto-complete
plugin or a server-side suggest script to overcome.
Changed paths:
U web/php/branches/PROTOTYPE_2010/css/structure.css
U web/php/branches/PROTOTYPE_2010/css/theme.css
U web/php/branches/PROTOTYPE_2010/index.html
U web/php/branches/PROTOTYPE_2010/js/common.js
A web/php/branches/PROTOTYPE_2010/js/jquery.autocomplete.pack.js
A web/php/branches/PROTOTYPE_2010/js/search-index-en.js
<diffs exceeded maximum size>