Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18519
| From | "Robert Crandal" <rcranz143101@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| References | <haWdnRUFFpDr0IbMnZ2dnUVZ5uidnZ2d@giganews.com> <1605051.1mSJY5JTrl@PointedEars.de> |
| Subject | Re: Implement offline site search? |
| Date | 2013-02-17 02:24 -0700 |
| Message-ID | <79CdndDtp9VePL3MnZ2dnUVZ5radnZ2d@giganews.com> (permalink) |
"Thomas 'PointedEars' Lahn" <PointedEars@web.de> wrote in message news:1605051.1mSJY5JTrl@PointedEars.de... > Robert Crandal wrote: > > > There is no Javascript. But with an ECMAScript implementation such as > JavaScript you can, in a sufficiently recent Web browser, use an > implementation of the XMLHttpRequest API. > Our computer runs Windows 7 and I believe our main web browser is Internet Explorer 8.0. Do you think are Web browser is recent enough? Is it possibly already equipped with this XMLHttpRequest API that you mention? > That API, with sufficient permissions granted, allows you to GET listings > of > (local) files (the format will vary between UAs) and to GET the file > contents via URIs. Having the files' content, you can build from that an > index as an Object instance (preferably with empty prototype chain, or a > collision-avoiding Map implementation such as JSX:map.js) that ultimately > maps words (property names) to a list of files that contain them > (references > to Array instances of file names, as property values). [As an > optimization, > a previous object could also map prefixes to words.] > > You can store that index in serialized form in Local Storage and from that > point forward only use the unserialized form of the index to perform the > search until the index needs to be updated. > Do you know where I can get a very simple example that demonstrates how to GET listings of local files? How about a simple example of how to GET the file contents via URIs?? I understand many programming concepts, but I'm unfamiliar with this Web API that you mention. > > As an alternative, you can use other software to build a script resource > with the index as an Object instance that you use for searches after you > loaded that resource from an HTML document. An example of that can be > found > in SELFHTML's offline search; the code quality thereis is awful, but > debugging that code could still help. Probably there are other, better > implementations as this is not likely to be an uncommon problem. > Most of the online documentation for SELFHTML that I found is printed in the German language, which I can't read, hehe. I doubt we'd be able to install software on this computer anyways. 8( Robert
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Implement offline site search? "Robert Crandal" <rcranz143101@gmail.com> - 2013-02-13 01:23 -0700
Re: Implement offline site search? Tim Slattery <Slattery_T@bls.gov> - 2013-02-13 09:04 -0500
Re: Implement offline site search? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-13 15:23 +0100
Re: Implement offline site search? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-13 15:33 +0100
Re: Implement offline site search? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-13 15:06 +0100
Re: Implement offline site search? "Robert Crandal" <rcranz143101@gmail.com> - 2013-02-17 02:24 -0700
Re: Implement offline site search? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-17 13:18 +0100
Re: Implement offline site search? John G Harris <niam@jghnorth.org.uk.invalid> - 2013-02-17 16:14 +0000
Re: Implement offline site search? "Robert Crandal" <rcranz143101@gmail.com> - 2013-02-17 11:54 -0700
Re: Implement offline site search? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-17 20:52 +0100
Re: Implement offline site search? "Robert Crandal" <rcranz143101@gmail.com> - 2013-02-17 15:10 -0700
Re: Implement offline site search? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-17 23:16 +0100
Re: Implement offline site search? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-18 09:54 +1100
Re: Implement offline site search? John G Harris <niam@jghnorth.org.uk.invalid> - 2013-02-18 10:17 +0000
Re: Implement offline site search? "Robert Crandal" <rcranz143101@gmail.com> - 2013-02-18 11:43 -0700
Re: Implement offline site search? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-19 06:27 +1100
Re: Implement offline site search? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-19 06:33 +1100
Re: Implement offline site search? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-02-18 12:23 +0000
Re: Implement offline site search? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-02-13 10:23 -0700
Re: Implement offline site search? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-14 10:56 +0100
Re: Implement offline site search? John G Harris <niam@jghnorth.org.uk.invalid> - 2013-02-14 10:20 +0000
Re: Implement offline site search? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-14 11:26 +0100
Re: Implement offline site search? Wally W. <ww84wa@aim.com> - 2013-02-14 08:07 -0500
Re: Implement offline site search? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-02-14 22:47 +0000
Re: Implement offline site search? Scott Sauyet <scott.sauyet@gmail.com> - 2013-02-14 18:49 -0800
csiph-web