• anonymous (unregistered) in reply to brazzy
    brazzy:
    Casiotone:
    Saving bandwidth is a WTF?


    If you mean the original WTF: yes, because it does NOT save bandwidth - quite the opposite, in fact. All the keywords and stuff are transmitted every time the page is loaded, making it considerably bigger than it would otherwise be - and the search feature will probably not be used upwards of 95% of the time.


    Uhhh.... not if the  "searchItems" arrays are stored in an include file.  The user's browser will cache the file.  Unless the search data is always changing, this method could actually save bandwidth.  Think about it - you use a cron job to have php or asp or perl or whatever write the search data into a js file, and then you just include the file in between the <head></head> section.

  • (cs)

    Nobody mentioned that this interesting piece of code doesn't work if the browser has no JS support or it's disabled. I keep JS off on all sites I'm not familiar with; it eliminates the popup ads and malicious scripts.

  • Jack (unregistered)

    How can I use that on my page?

Leave a comment on “The JavaScript Search Engine”

Log In or post as a guest

Replying to comment #:

« Return to Article