Couldn't agree more. I'm a lead web developer at a company and whenever I'm asked to interview a potential employee I give em' a short coding task. Internet access is allowed. The only restriction I give em' is not to clear their search history.
If the candidate knows the problem he/she is facing and can formulate good query to look for a solution; that's a ++