Cheasrouch Sok
Cheasrouch Sok

Reputation: 53

Angular cache images when already loaded?

we display item image in item list page when click on each item go to item detail.

the problem we don't want to load image again just take it from item list to display

how to solve this?.

Upvotes: 3

Views: 4777

Answers (2)

Cheasrouch Sok
Cheasrouch Sok

Reputation: 53

Most browsers by default cache but firebase storage's image is not cached

Firebase storage Image cache not working

Upvotes: 2

Sagar Khatri
Sagar Khatri

Reputation: 635

Most browsers by default cache the images that are loaded in your application once so when you make the same request again, it doesn't necessarily need to load it from the server again.

To check this, you can run your application in Chrome, then run developer tools and go to the Network tab and in the filter section click on the Img label so it will filter by images only.

Once you do this try hitting refresh on your page and you will see that some images are loaded from either disk cache/memory cache thus eliminating the need to load from the server again and again.

Network Tools

Upvotes: 0

Related Questions