Skip to content

Instantly share code, notes, and snippets.

@ionicpanda
Created October 22, 2018 16:53
Show Gist options
  • Save ionicpanda/2dda2f37f3eef0a1e88e64da5cfc2b78 to your computer and use it in GitHub Desktop.
Save ionicpanda/2dda2f37f3eef0a1e88e64da5cfc2b78 to your computer and use it in GitHub Desktop.
  1. What is the OPTIONS method used for? The OPTIONS method asks the server to report the HTTP methods that are available for a particular resource.

  2. What are the IF-Modified-Since and If-None-Match headers used for? The If-Modified-Since header is used to specify the time at which the browser last received the requested resource. The If-None-Match header is used to specify the entity tag that the server issued with the requested resource when it was last received.

  3. What is the significance of the secure flag when a server sets a cookie? The secure flag is used to instruct the browser that the cookie should only ever be resubmitted over HTTPS connections, and never unencrypted HTTP.

  4. What is the difference between the common status codes 301 and 302? The 301 status code tells the browser that the requested resource has moved permanently to a different location. The 302 status code tells the browser that the requested resource has moved temporarily to a different location.

  5. How does a browser interoperate with a web proxy when SSL is being used? The browser sends a CONNECT request to the proxy, specifying the destination hostname and port number as the URL within this request. If the proxy allows the request, it returns an HTTP response with a 200 status, keeps the TCP connection open, and from that point onwards acts as a pure TCP-level relay to the specified destination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment