Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Sam Weeks
Front End Web Development Techdegree Student 16,699 Pointsplaceimg.com wont refresh new img or display at all on one of my pages i've used the java script code no luck
<h1>Resume</h1> <img scr="http://placeimg.com/200/200/tech" alt="Sam Weeks, Web Developer">
<img src="https://placeimg.com/400/400/any" alt="Drawing of Jane Smith" class="profile-image">
first link wont open up any image at all 2nd will only upload once until i clear my cache and cookies
i've tried the javascript code on other answered questions similar to this but still no luck any feed back would be most appreciated
4 Answers

Sam Weeks
Front End Web Development Techdegree Student 16,699 Pointsim very new to this i researched how to clear cache and cookies but not to prevent

deebird
7,546 PointsYour first link has a typo, scr should be src

Sam Weeks
Front End Web Development Techdegree Student 16,699 Pointsthank you deebird i did change this and place-img still didnt seem to register, once it uploaded one image it wouldn't refresh to another random one like its supposed to generate.

deebird
7,546 PointsAre you doing anything to prevent caching?

Matthew Jergens
4,066 PointsI found the following script on another Treehouse forum, and it fixed the problem for me. <script> document.querySelector("img").src += "?nocache=" +Math.random();</script>
deebird
7,546 Pointsdeebird
7,546 Pointsbrowsers generally cache css files to increase performance. If you want it to clear every time you could use a cache buster, you can do this with php, js or sass (for bg imgs). If you just want to clear the cache for working on your local computer you can just modify your browser settings.