Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
First, Im new ^^
Im changing the background image of an application which should change in clients browsers too.But the updated image is displayed as the image loading from cache.I want to load it from web server.When i do cntrl+5 page is loading from server.If anyone knows the solution please help me :D

Thanks for all help



What I have tried:

I have tried many syntax to hard reload the page.
ex:location.reload(true);
window.location.href = window.location.href;
These syntax are not all working.Looks like it got deprecated.
Posted
Updated 6-Jan-22 6:35am
v3

1 solution

There a options for this, depending upon how you want the page to be cached and which parts not cached. It has to do with what are called "meta-tags" in HTML. Some of they you may already use (or were put in for you by a development tool). Things like naming the page and character interpretation information are handled this way.


Disable browser caching with meta HTML tags - Knowledge Base - Cristian Sulea[^]

I actually have this at the top of nearly every page in create. It's essential for development (as with the problem you have) but I leave it in for all pages all of the time. It adds some certainty to what your users will see.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900