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 trial

HTML Introduction to HTML and CSS (2016) HTML: The Structural Foundation of Web Pages and Applications Image Tags

Bethany Quinn
Bethany Quinn
1,745 Points

Why won't the image randomize? Every time I refresh it's the same image generated on placeimg.

I've followed exactly what she does, my code looks the same. I've tried with the /nature /any, I've even tried some other websites and still the image doesn't change once set, even when reloading the page.

1 Answer

Kieran Barker
Kieran Barker
15,028 Points

Hi, Bethany! Your browser is caching the image; this is entirely normal. You'll need to clear your cache each time you want to see a new image. If you're using Windows, a quick and easy way to do this is to do a hard refresh by pressing Ctrl + F5 on your keyboard. If not, just go into your browser settings and clear your cache, then refresh normally. I don't think there's as easy of a method to hard refresh on Mac as on Windows. I hope this helps!