HTTP Flashcards
At a high level, describe how the web works.
1) The web browser sends an HTTP request.
2) HTTP server interrogates the request and decides which HTML to produce.
3) HTTP server fetches the required data from a database.
4) HTTP server merges the data into the HTML and returns it to the web browser as an HTTP response.
What are the parts of a HTTP request? How about a response?
1) The client sends a request to the server
2) The server passes the request to the database
3) The database checks to see if it contains the requsted information
4) The database will return either a success or failure response code to the server
5) The server then passes that that response back to the client, to be displayed in some way on-screen.
What is an HTTP status code? Name a good one.
404 - Not found
What is a server telling me when it returns a status code between 300 - 399?
Redirection. The request hasn’t failed, but the client must use a different approach.
Name at least one web server.
Apache Tomcat
True or false?: TCP/IP is a text-based protocol.
False, Transmission Control Protocol) is a binary protocol.
True or false?: HTTP 1.1 is a text-based protocol.
True
True or false?: a URL’s path must map to a physical file on the server.
Always present but not always visible.
Where does caching happen with HTTP?
GET
What is a cookie?
Cookies are files created by websites you visit. They make your online experience easier by saving browsing information. With cookies, sites can keep you signed in, remember your site preferences, and give you locally relevant content.
What is JDBC?
Java Database Connectivity (JDBC) API is a Java library that standardizes database access. It turns any Java application into a database client.
What is an API?
API stands for Application Programming Interface. Essentially, they function as a junction between the client-side and server-side. Think of APIs as an electrical outlet: The power cord from your computer is the client, while the electrical grid behind the wall is the server. APIs allow the client to access all of the hard work done in the server without having to know what exactly the server is doing. So, in our example, the power cord doesn’t need to know all of the electrical grid information, it just needs to know where to connect to get the electricity it needs.