Skip to Content TM
  • Links
  • About

blog.jim-nielsen.com

A Simple Tactic For Progressively-Enhanced Search

A simple but clever (the good clever this time!) approach to implementing a progressively enhanced search on a website: in the no-JS case, the search form submits via a GET request to your search engine of choice, with the search input mapped to the q parameter. E.g. with DuckDuckGo:

<form method="get" action="https://www.duckduckgo.com/">
<input type="text" id="search" name="q" />
<button type="submit">Search</button>
</form>

Then when JS loads you could use something like PageFind for a more interactive on-site experience. Might have to try this on my personal site.

Feb 6, 2025 · 1 comment

Comments

  • Log Out
1 comment
  • Tyler Mercer
    02/17/2025

    Seems like this no longer works with Google (it will take you to Google, but Google won't show results without JS), but does still work with DuckDuckGo, provided you include a hidden input with the name sites containing your site domain.


© 2025 Tyler Mercer. All rights reserved.

Home | Posts | Links | About | Contact

RSS | JSON