How to create a loop in bash that is waiting for a webserver to respond?

It should print a "." every 10 seconds or so, and wait until the server starts to respond.

Update, this code tests if I get a good response from the server.

if curl --output /dev/null --silent --head --fail "$url"; then
  echo "URL exists: $url"
else
  echo "URL does not exist: $url"
fi
Edit
Report