Q
Q
Qairat2016-12-23 12:35:23
open server
Qairat, 2016-12-23 12:35:23

What should I do to change the image when I refresh the page?

I change the picture in the folder.
And I write the name of the new picture in my code.
I refresh the page, the new picture is not displayed, but it still shows the old one. And removed the old one.
What should I do to display the new image?
Lokalka on open server-e. Tried restarting it. Did not help. I did not find answers on the Internet.
Help...

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Rurik Rostislavich, 2016-12-23
@snipeer777

Ctrl+F5

L
lere, 2016-12-23
@lere

Try clearing your browser history, it helps in most cases!

G
Grigory Vasilkov, 2016-12-23
@gzhegow

1) The first thing to do is CTRL+F5
2) Press CTRL+F5 a few times - you won't believe it, browsers are the only place where two reloads are better than one.
2b) Install the Clearcache extension in the browser and click the "Clear" button.
3) Add a parameter to the link with "img.jpg?" . filetime($filename); if you write in a server-side language (PHP for example).
4) If you changed the link to a link with a question, but the question did not appear in the layout, then you are writing on a CMS that has its own cache. I'll have to go to the forums and look for where she keeps it in order to clear it. Such govnotsms-ki happen.
5) And last but not least - open your picture via a direct link and press CTRL + F5 there and make sure that it has changed.
6) Если она изменилась, а при возврате на страницу все еще старая, проверьте URL - если он совпадает с пунктом 5, вы не поверите - ЗАКРОЙТЕ БРАУЗЕР и откройте его снова. Современные требования быстродействия заставляют браузеры почерному кешировать некоторые иконки и favicon, что вроде бы поменялось, а на деле все равно из локального хранилища картинки берутся.
7) Попробовать в режиме инкогнито CTRL+SHIFT+N в большинстве браузеров.

Евгений Вольф, 2016-12-23
@Wolfnsex Куратор тега Веб-разработка

Нажать Ctrl+F5 или Ctrl+R в браузере, пару раз.
Если не помогло, открыть в бараузере исходный код страницы и посмотреть, что там действительно прописана новая картинка.
Если и это не помогло, то убедиться в том, что Вы точно тот файл правите, который нужно.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question