javascript check if url file exists