Improve url resolver.

the whole page will be read and decoded now.