I'm using jQuery (and then plain JS) to get some Json from a URL, and expect it to be cached all the time.
- The HTTP request is setting
Cache-control: public, max-age=30
- The
X-Request-Id
is meant to change on each request, thus allowing us to see whether the response was taken from browser cache.
Behavior on jsfiddle is different:
With jquery: http://jsfiddle.net/6w8xt0hd/2/
2e5af47b-60f4-479f-be0a-78a15613bcc1
2e5af47b-60f4-479f-be0a-78a15613bcc1
2e5af47b-60f4-479f-be0a-78a15613bcc1
2e5af47b-60f4-479f-be0a-78a15613bcc1
2e5af47b-60f4-479f-be0a-78a15613bcc1
2e5af47b-60f4-479f-be0a-78a15613bcc1
2e5af47b-60f4-479f-be0a-78a15613bcc1
2e5af47b-60f4-479f-be0a-78a15613bcc1
Plain js: http://jsfiddle.net/ajxd7eyy/2/
b1bab8b7-0474-4927-9209-4ef6f6c365c5
b1bab8b7-0474-4927-9209-4ef6f6c365c5
b1bab8b7-0474-4927-9209-4ef6f6c365c5
b1bab8b7-0474-4927-9209-4ef6f6c365c5
b1bab8b7-0474-4927-9209-4ef6f6c365c5
b1bab8b7-0474-4927-9209-4ef6f6c365c5
b1bab8b7-0474-4927-9209-4ef6f6c365c5
b1bab8b7-0474-4927-9209-4ef6f6c365c5