HTTP Response before Request

后端 未结 7 1818
梦毁少年i
梦毁少年i 2020-12-23 17:16

My question might sound stupid, but I just wanted to be sure:

  • Is it possible to send an HTTP response before having the request for that resource?
7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 18:03

    You'll get a better result by caching resources effectively, i.e. setting proper cache headers and configuring your web server for caching. You can also inline images using base 64 encoding, if that's a specific concern.

    You can also look at long polling javascript solutions.

提交回复
热议问题