Search code examples
httprequestserver-side

Can You Use The Server To Bundle Files & Reduce HTTP Requests?


If I understand HTTP requests correctly, they come from the client side and ask the server for the various resources needed to build the website. If this is true, is there a way to use server-side scripts to bundle everything the visitor needs in order to reduce HTTP requests?

  • Am I misunderstanding the way HTTP requests work?
  • Is there a drawback to this?

Solution

  • There are several techniques:

    • you can bundle several of your ressource in a single file, exemple, all css, javascript, etc...
    • you can send multiple files in one:http pipelining
    • http 1.1 reuse the connection so this reduce also the request/response time....