Optimized the urlToChildBrowser code