I noticed that if you search for something which doesn’t exist on freeCodeCamp, you get a blank page. Is this a bug or should something like “No Results Found” be clearly printed on the webpage?
Are you sure it is a blank page or does it just take 15-20 seconds for content to load. That is what I have observed.
Thanks for the reply. I meant in the specific case where there are no results found, it might be better to clearly display “No Results Found.”. Just a minor detail - I’ve included a screenshot to explain what I mean.
@abdolsa Is this something being worked on? Also, I notice it sometimes takes 10-15 seconds for something to appear after performing the search. While I wait, I see the very same blank page for quite a long time and then finally see some results. Shouldn’t there be something like “Searching…” or some kind of loading icon while waiting for the results?
Thanks for reporting this, I believe @scissorsneedfoodtoo would have a better answer.
@arjunnij, thank you for reporting this. It would be much better to show a “No Results Found” message if there are no search hits rather just a blank page. An alternative might be showing ‘No results found for “(search term)”.’ I can start working on this in the next day or two.
@RandellDawson, I remember you mentioning that search results take a long time to appear for you. Does this only happen on /news, or elsewhere like / and /learn? Also, do the results take a long time to appear on the dropdown, or also on the /news search results page?
It is not doing it today. I don’t think it mattered which page I was on when it did it.
I have a suggestion for the search results. When a user is typing something into the search bar and no results have been found, a message “No tutorial found” currently appears. Since you already know there are no search results, why not just do nothing if the user hits
Enter (attempting to submit). That way, there is never a reason to show a blank page or a page with "No results found for “(search term)”. It seems like this would be one less request made to the server.
@RandellDawson, that’s an excellent idea. While it’s still possible for users to enter a random search term in the URL, I seriously doubt many will do that. Not showing a “No tutorial found” message at all seems like a much cleaner way to handle this. Better than seeing a quick flash of the message as tutorials are loaded.
I’ll start digging into this tomorrow, first on News, then on the main platform.