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

  • Home
  • SEARCH
  • 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 9185463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:16:58+00:00 2026-06-17T19:16:58+00:00

I am creating a dynamic image dependent on a lot of information about the

  • 0

I am creating a dynamic image dependent on a lot of information about the logged in user, but with so many users online, the image system is using a lot of the resources my website hosts have allocated to me.

Is there a way to tell the browser to temporarily cache an image? Similar to temporary cookies?

The image contains numbers such as post count and other frequently incrementing numbers that can cause the browser’s automatically cached images to re-download the image potentially every page load. I wouldn’t mind a little inaccuracy to save a lot of processing for my server

  • 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-06-17T19:16:59+00:00Added an answer on June 17, 2026 at 7:16 pm

    [Edit]
    Browsers already do cache content(unless specifically told not to do so), if it detects a change in last modified then it reloads it.

    I am taking a guess that your image being generated is either a) being returned to the browser by a specific php script() or b) is being stored temporarily but is being updated and so the browser retrieves the updated version.
    [/Edit]

    If you are outputting an image based on dynamically generated content you can write this temporarily to a directory and then based on a predefined time period pull the image if its valid.

    if(file_exists($file) && filemtime($file) <= time()-60*20) {
        // Regenerate image
    } else {
        // Load image from cache
    }
    

    The example above will not regenerate the image for 20 minutes.

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

Sidebar

Related Questions

I'm creating an dynamic image, which creates headers on my page using PHPs GD-library.
I am creating dynamic TextFields in actionscript 3.0. Like many others, my text disappears
Was wondering if anyone had any smart approaches to creating dynamic vanity user urls
I'm creating a dynamic responsive week calendar, using Twitter Bootstrap . Here's my current
I am using the following code to create a dynamic reflection of an image:
Ok, so my site is centric to a lot of dynamic user entered images
How can I create a dynamic url to display an image? I am creating
I am creating a window with two image buttons (using TriplePlay in my playN
I am creating dynamic menus and submenus in php.... Can't know where to start....
I'm creating dynamic templated XAML designs that I would like to convert to PNG

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.