I'm not following this logic - yes, don't seturl if url is null but why not use the url if it ends with the filename and what is special about mozilla to not use this url ?

Please explain/add comments in code for that.