SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Location
    Perth, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Refreshing images

    Hi all,

    Wasn't sure which forum to post this in so I apologise if it is the wrong one.
    I have a function using the GD libraries to rotate an image. The rotating is working fine, however the browser is not refreshing the images, even with a header() redirect function. Only when I press ctrl+F5 will the image show as rotated.
    Is there anyway to do a forced refresh when the page gets reloaded?

    Thanks in advance

  2. #2
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,935
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Give the image a random query string which is changed on each page load.
    PHP Code:
    echo '<img src="'.$src.'?t='.time().'" alt="'.$AltText.'">'

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Location
    Perth, Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks bokehman, that works perfectly


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •