Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 947181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:02:41+00:00 2026-05-15T23:02:41+00:00

A web app I’m developing uses lots of asynchronously loaded images that are often

  • 0

A web app I’m developing uses lots of asynchronously loaded images that are often modified over time while their URLs are preserved. There are several problems with this:

  1. If I do not provide the images with caching explicitly disabled in HTTP headers, the user will often receive an out of date image version, but doing so substantially increases server load.
    How can I take the cache control away from the browser and manually evaluate if I should use the cached image or reload it from the server?

  2. Since there are many separate images to be loaded, I also parallelize image downloads over different hostnames (i.e. the image01.example.com, image02.example.com, but all these hostnames resolve to the same physical server). Since the NN of the hostname is generated randomly, I also get cache misses where I could have retrieved the up-to-date image from the browser cache. Should I abandon this practice and replace it with something else?

  3. What cache control techniques and further reading material would you recommend to use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:02:41+00:00Added an answer on May 15, 2026 at 11:02 pm
    1. To force a load, add a nonsense parameter to the URL

       <img src='http://whatever/foo.png?x=random'>
      

      where “random” would be something like a millisecond timestamp. Now, if what you want is to have the image be reloaded only if it’s changed, then you have to make sure your server is setting up “Etag” values for the images, and that it’s using appropriate expiration and “if modified since” headers. Ultimately you can’t take the cache control away from the browser in any way other than your HTTP headers.

    2. Instead of generating NN randomly, generate it from a hash of the image name. That way the same image name will always map to the same hostname, and you’ll still have images distributed across them.

    3. I don’t have a good suggestion but web implementation advice is abundant on the Internet, so I’d say start with Google.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a web app that has a database backend. In the past I'm
I have a huge web app that is having issues with memory leak in
In my (PHP) web app, I have a part of my site that keeps
we're developing a web app to cover all aspects of a printing company from
I've got a web app that sends out emails in response to a user-initaited
I'm writing a web app that points to external links. I'm looking to create
I am developing a web app which requires a username and password to be
I am writing a web app using TurboGears, and in that app the users
Web app I'm working on generates HTML using Velocity templates. Problem is that using
A web app that I'm writing throws this compiletime error Error 1 The type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.