accept `url` as function or deferred function`