search

Home  >  Q&A  >  body text

javascript - Is there a way to request a URL without loading the requested resource? Just establish a connection?

Now there is a website html page. I just want to establish a connection with it, but I don’t want to load its resources. Is there any way to do it?

过去多啦不再A梦过去多啦不再A梦2737 days ago476

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-05-19 10:46:59

    HTTP HEAD request

    The HTTP HEAD method requests the header information of the resource, and these headers are consistent with those returned when requested by the HTTP GET method. One usage scenario of this request method is to obtain the size of a large file before downloading it and then decide whether to download it. In this way, Save bandwidth resources.

    The response to the HEAD method should not contain the response entity. Even if the entity is included, it must be ignored. Although entity headers describing entity information, such as Content-Length, may be included in the response, they are not used to describe the HEAD response itself. , but is used to describe the response that should be returned by a GET request under the same situation.

    https://developer.mozilla.org...

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-19 10:46:59

    Construct the tcp package and set the window to 0. I remember that the function you want to implement can be used to do bad things. You can check DoS.

    reply
    0
  • Cancelreply