I just meant that they were hypothetical examples, not endpoints of some existing app.
No need to apologize. This is new for all of us.
Express parses incoming web requests and puts the data in convenient data structures for us. (I didn't talk about that, but it does.) It then transfers control to one of our handler functions, depending on the endpoint.
It turns out, for many reasons, there are two
kinds of web requests: GET and POST. (Actually, there are 9, but
GET and POST are the only ones that we can use the
the method
attribute of a form, so they cover 99% of
all web requests.)
So, when Express gets a request, it uses both the endpoint and the method to choose the handler.
It occurs to me that this part of the reading could be clearer and more comprehensive. I'll put that on my to-do list. Thanks for this question.
GET, since that's the only other option.
We use GET for reading data, like searching, etc.
We use POST for updating data, like posting a picture or
comment, etc. There's a reason it's called POST
.
It depends entirely on the back-end, meaning us.
We could return a brand new web page, we could return the same web page we were on when we POSTed, we could return almost nothing at all, we could return a copy of the data that was posted, ...
Browser caches do, yes. Cuz everyone wants them.
Yes! Well, with normal web activity. As we'll learn after the break, caches can store cookies, which are used in authentication and sessions.
If you're having trouble with a website, it can be useful to clear those out, essentially forcing it to forget you and start all over again.
Great!