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

Fito Lazare
Fito Lazare
1,436 Points

my img source doesn't do the random pick.

I changed the source of the img file like instructed but it does pick a random pick every time I refreshed it. Please help. Thanks

Tarran Prior
Tarran Prior
Pro Student 3,154 Points

No problem, happy to help!

I wouldn't recommend permanently disabling cache, as it's essential for efficient web browsing (such as loading frequently visited web pages faster.) But there are certainly ways to do it.

However, if you're using Chrome - a nifty feature can disable the cache while you're in developer mode. To do this, simply right-click the page with the 'placeimg' image, and select Inspect. You'll see several tabs along the top of the new window such as Element, Console, Sources etc. Select Network, and you'll see a checkbox below that reads "Disable cache."

You can then keep this checked until you've finished developing/testing the page. The 'placeimg' image will now change to a new image each time you refresh the page.

Most other browsers will also allow you to do this in a similar way. Let me know if you need any more help. :)

Fito Lazare
Fito Lazare
1,436 Points

Thank you. I got it..

5 Answers

Tarran Prior
PRO
Tarran Prior
Pro Student 3,154 Points

Hey Fito.

Your browser is most likely displaying a cached image rather than fetching a new image each time you refresh the page. You can solve this by clearing the cache in your browser. However, the next image that displays will also be cached.

In most browsers, you can temporarily disable cache by going into Developer Tools. If you'd like to know how to do this, feel free to ask. But you can be rest assured that this issue isn't at your fault. :)

Hope this helps!

Fito Lazare
Fito Lazare
1,436 Points

Thanks, is there a way to permantly shut down the cache collection? would you recommend it?

Fito Lazare
Fito Lazare
1,436 Points

http://placeimg.com/400/400/nature

I did it like she did but I used nature instead.

Dmitry Polyakov
Dmitry Polyakov
4,379 Points

It's working when you put it into an address box in a browser. Maybe you missed some quotation mark

it should be like this

src="http://placeimg.com/400/400/nature"

Fito Lazare
Fito Lazare
1,436 Points

I did all the quotation marks correct but I'll try to clean the cache and let you guys know the results. Thanks for the help Dmitry.