summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-09-29 16:28:33 -0600
committermo khan <mo@mokhan.ca>2025-09-29 16:28:33 -0600
commit43e6edfc37257005f998c23bedf8bfa7f8089dd0 (patch)
tree8fa59447c105987d145bce81bd15c92bcc363397
parent3fb42b615e7eb003e70bd1803d62a2afe59f8874 (diff)
re-write web caching answer
-rw-r--r--assignments/1/README.md28
1 files changed, 25 insertions, 3 deletions
diff --git a/assignments/1/README.md b/assignments/1/README.md
index 320a8ed..334f69f 100644
--- a/assignments/1/README.md
+++ b/assignments/1/README.md
@@ -220,9 +220,31 @@ Reference: Kurose & Ross, 8th ed., Sec. 1.4 (delays in packet switching and traf
> (5%) What is Web-caching? When may Web-caching be more useful in a university? What problem does the conditional GET in HTTP aim to solve?
-- Web caching stores frequently requested objects close to users to reduce delay and external bandwidth.
-- More useful at a university because many users request the same resources, raising cache hit rate and lowering Internet link load.
-- Conditional GET (If-Modified-Since or If-None-Match) lets caches validate freshness without re-downloading unchanged objects (304 Not Modified vs 200 OK).
+Web caching comes in a few forms. One form is client side caching that allows
+browser to cache content and re-serve that content to end users if specific
+conditions are met. The second form for caching is server side caching. Server
+side caching may happen when an expensive computation is computed once or rarely
+and stored in a server cache to be re-used for subsequent requests. It may also
+be storing static assets in content delivery networks (CDN's) that are
+strategically deployed closer to end-users to deliver content faster without
+needing to reach back to an origin server to retrieve the content on every
+request. In the case of a university setting, it is likely that students are
+accessing the same content and therefor serving cached content might be faster
+than computing from scratch or fetching from the origin server for each unique
+student request.
+
+The following HTTP Headers are useful with caching.
+
+- [`Pragma`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Pragma)
+- [`Expires`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Expires)
+- [`If-Modified-Since`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/If-Modified-Since)
+- [`If-None-Match`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/If-None-Match)
+- [`E-tag`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag)
+- [`Cache-Control`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control)
+
+This would be useful in a university setting because many students request the
+same data so serving the same cached content to different students is likely
+safe and will reduce the outbound internet link load and traffic.
Reference: Kurose & Ross, 8th ed., Sec. 2.2 (HTTP, Web caching, conditional GET).