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 6554565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:42:55+00:00 2026-05-25T12:42:55+00:00

Here’s an odd one, for me at least. I’m reading an image into a

  • 0

Here’s an odd one, for me at least. I’m reading an image into a cf image variable and saving it as a session variable:

<cfimage action="read" source="myPath/image.jpg" name="myImage" />
<cfset session.image = #myImage# />

I plan to be manipulating that image at some point, which is why I’m saving it to a variable. Anyway, then I stream it with cfcontent:

<img id="photoPlaceholder" src="/#application.root_name#/administration/PhotoManagement/displayPhoto.cfm" width="500px" />

from template displayPhoto.cfm:

<cfcontent  variable="#imageGetBlob(session.image)#" />

Here’s the problem. After the first call, the first retrieved image is displayed no matter which new image is passed to it. I’ve tried destroying the session variable before the cfimage tag, and I’ve verified that I’m passing the correct image variable each time. The only way a new image is shown is if I refresh the page.

It seems to me that cfimage is somehow caching the image, and each new call to it doesn’t refresh the variable myImage. CF documentation says nothing about this, and google brought up nothing.

Thoughts?

  • 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-25T12:42:56+00:00Added an answer on May 25, 2026 at 12:42 pm

    Your problem is probably client-side. Since the URL in your img tag doesn’t change (…displayPhoto.cfm), your browser doesn’t see that you are in fact pointing to a new image, so it keeps serving up the image already in cache.

    You might try adding a randomized fake parameter to the end of your src attribute, something like this pseudo code:

    <img id="photoPlaceholder" src="/#application.root_name#/administration/PhotoManagement/displayPhoto.cfm?somevar=#aUniqueValue#" width="500px" />
    

    You could create the aUniqueValue variable from a random number generator or timestamp generator.

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

Sidebar

Related Questions

Here is binding: <Image Width=16 Height=16 Source={Binding SwitchForImage, Converter={StaticResource stringToImage}} HorizontalAlignment=Left> </Image> and here
Here is some code I made :) @echo off set source=R:\Contracts\ set destination=R:\Contracts\Sites\ ROBOCOPY
Here is my problem : I have a post controller with the action create.
I am reading a book about Javascript and jQuery and using one of the
Here's an example query: DECLARE @table table (loc varchar(10)) INSERT INTO @table VALUES ('134a'),
Here's a problem I ran into recently. I have attributes strings of the form
Here is my project Here I want to insert something into my database. I
Here is my problem...I have a page that loads a list of clients and
Here is the situation, I am attempting to fire a set of Gallio tests
Here is an example: I have a file 1.js, which has some functions. I

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.