Why doesn't it return 304?
Because when you press F5 , your browser cache will expire. Basically your test is ruined. You should put links to this package on different pages (using the <script> ). Then you must go to these pages using hyperlinks. Now view the Network tab.
Also make sure that you are in Release mode.
UPDATE:
OK, after I dug up a little more, I found out about it. The HTTP code 200 is indeed sent, which is normal. But the second time the packet is retrieved from the cache.
Here is the first request:

We see that in this case, the bundle occurs from the server with the HTTP cache response headers.
And here is the second request:

In this second screenshot, we can clearly see that the packet is being served from the cache. Note that the entire line is gray. The HTTP 200 status code is fictitious => the client doesnβt even send an HTTP request to the server because it retrieves the packet directly from its cache.
And I can observe the same thing in Google Chrome.
For the first request:

And for the second request:

source share