Skip to content

CpanelInc/url-exists-deep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-exists-deep

A deeper node library to determine if a url exists.

url-exists-deep was developed for performance and accuracy. To check whether a url exists or not a HEAD request is sent, because this is much faster then a GET. Most hosts are responding correct. If the host responses with a 403 Forbidden a GET request with User-Agent and Accept header is sent.

Usage

var urlExists = require('url-exists-deep');
var url = 'https://www.google.com';
urlExists(url)
  .then(function(res){

    if (response) {
      console.log("Url exists", res.href);
    } else {
      console.log("Url does not exists!");
    }

  });

Makes a deeper determination if a url exists or not. To reduce false negative responses.

Rewrites 301

If url redirects with 301 url-exists-deep follows the redirect and returns the destination url if exists.

About

A deeper node library to determine if a url exists.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.5%
  • Makefile 1.5%