Use HEAD request method 使用HEAD请求方法
To do this, make a HEAD request and then check for a 404 error in your callback function; Listing 11 shows a sample callback.
要实现这种功能,生成一个HEAD请求,然后在回调函数中检查404错误;清单11给出了一个简单的回调函数。
Still, sometimes it's useful to know exactly what is available; you never know when creativity will strike and you'll need the HEAD request!
不过,有时确切地了解目前什么可用也是非常有用的;您永远不会知道何时创造力就会迸发或者何时需要 HEAD 请求!
What is the value in making a HEAD request?
生成 HEAD 请求的价值是什么呢?
应用推荐