Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Image updated on website, how to trigger content change on client browsers

Posted on 2014-04-30
4
Medium Priority
?
212 Views
Last Modified: 2014-05-06
I updated images on a website, but some of images still show old images. How can I trigger so that client browsers get all updated images when they visit next time?
0
Comment
Question by:crcsupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 34

Assisted Solution

by:Big Monty
Big Monty earned 1000 total points
ID: 40032946
the easiest way prevent image caching is to assign a random querystring to the src link:

<img src="myFile.png?a=12345" />
0
 
LVL 34

Expert Comment

by:Big Monty
ID: 40032948
the value of a can be a random number or a timestamp or any other random generated chars
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1000 total points
ID: 40033224
There is no guaranteed way to do that.  Some people set their browser cache to 20 days which means that they may not check for new files for 20 days after the last time they checked.  When I want people to see new things on a page, I change the file names and save a new copy of the page to the server.  That let's the browser know that the main page has changed and the new file names won't be found in the browser cache.  Note that images, CSS files, and javascript files are cached Separately from the main page.  Changing the file names is the easiest way to make sure they are updated in the main page.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question