Hacker News new | past | comments | ask | show | jobs | submit login

For content like this, it's much easier to download the entire search-index.json and run the auto-complete against that.

Rather that than hitting a search endpoint (after typing a certain amount of characters).




Sadly in 2021 adding 140KB to a page isn't a big deal (given how heavy the rest of the page probably is) - but it really should be.

A large chunk of the world's population still pays a locally-expensive rate for mobile bandwidth, and we're increasingly leaving them behind - or worse, pushing them into zero-rating internet plans which mean they can only use Facebook and WhatsApp while avoiding the rest of the web: https://en.wikipedia.org/wiki/Zero-rating


It's only added if the user shows an intent to search. And if you want to search, 144kb is a decent price to pay for instant search once it's downloaded


Oh I'd missed that - yeah loading it on-demand the first time they attempt to search is a much better strategy.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: