Search on a Static Site Print

  • staticsitesmodernframeworks, static, database, troubleshooting, nigeria, guide, howto, solution
  • 0

Finding content without a database.

THE PROBLEM

Search normally queries a database.

THE OPTIONS

A client-side search index, generated at build time A hosted search service No search, with good navigation instead

THE CLIENT-SIDE OPTION

Your generator produces an index file. A script searches it in the browser.

Works well for small to medium sites.

The index is downloaded, so it must stay small.

THE HOSTED OPTION

A service indexes your site and provides search.

Better for large sites, and it is a dependency and frequently a cost.

THE NO-SEARCH OPTION

For a site with twenty pages, clear navigation beats search.

Most visitors do not use site search anyway.

WHAT TO CONSIDER

How many pages you have Whether visitors actually need to search The index size on mobile data

FOR NIGERIAN VISITORS

A large index file downloaded on mobile data is a real cost.

Keep it small or use a hosted service.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot