Is the ETag received by response from the server stored inside the client?

Asked 2 years ago, Updated 2 years ago, 93 views

I'm working on a smartphone <-> Web server linkage

Whether to write cached data by dividing content received from the web server by ETag in response header

I want to decide whether to get a new one.

I have two questions about how you usually implement it.

1. At the time of the first server request, the client does not have an ETag value, so what do you put in the If-None-Match request?

2. Do you cache the ETag value received from the server inside the client and send it in the header at the next request?

iphone web server front-end

2022-09-21 15:20

1 Answers

I think you already understand.

ETag (Entity Tag, Server Response)

If-None-Match (client request)

It is implemented in all web browsers that implement HTTP/1.1, but when programmed, the corresponding cache control and request process above must be programmed directly.


2022-09-21 15:20

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.