Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAriana Kautz
Full Stack JavaScript Techdegree Student 1,657 PointsMy linked image src from placeimg.com doesn't generate different image every time. It's always that one image.
<img src="http://placeimg.com/200/200/any" It doesn't generate different image when I refresh it. It's always that one image. Thank you.
1 Answer
Michael Hulet
47,913 PointsIt's likely that your browser is just assuming that it will always get the same image whenever it goes to that URL and caches it so that it can save some data and time and not actually make another request. Try clearing your browser's cache and try again. Alternatively, you can add the following code to your page's head
to tell the browser it should never cache your page:
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
Ariana Kautz
Full Stack JavaScript Techdegree Student 1,657 PointsAriana Kautz
Full Stack JavaScript Techdegree Student 1,657 PointsOh wow, thank you so much Michael!