You can use below given curl command to check the website response and if expected response is received within the timeout time, we can check its slowness.
curl --connect-timeout 5 -Is https://jd-bots.com/ | head -1 | tr -d '\r'
Here the –connect-timeout is for 5 seconds i.e. command will gets timed out in 5 seconds if response is not received in 5 seconds and the website URL we are testing here is “https://jd-bots.com/“
You can use Git Bash/shell or Linux terminal to run this command.
Use below code snippet to test slowness, you can vary timeout time based on your requirements.
url=https://jd-bots.com/ response="$(curl --connect-timeout 5 -Is $url | head -1 | tr -d '\r')" echo $response if [[ -z $response ]] then echo "This site is slow, response not received within timeout" fi
You must be logged in to post a comment.