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.
Comments
1 comment
Tyler Mercer
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
sitescontaining your site domain.0 replies