Sorry... I can't deal with all the SPAM so until I can find a better solution for the forums, I'm locking them down. For now please use awesome services like for community support. Thanks.
This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
browser cache problem
  • hi all,

    Let's say i wanna use uploadify to upload a small picture then make it appear on the same page as soon as the upload is done.
    In fact, the previous stuff works fine ;)

    But, when i try to upload another picture (without any refresh (F5)), it uploads ok but the old picture appears.

    I'm nearly sure that it is because of cache browser (FF).
    What do you think i could do to in my php/html code to make the second picture appear ?
    I've seen lots of tips to force-reload (using php or html) but nothing worked for me.

    Maybe it has something to do with uploadify ? Have you got any clue ?


  • I would use append in onComplete. This is rough but you should get the idea
    onComplete : function (evt, queueID, fileObj, response, data) {
    $('#imgContainerDiv').append('<img src=\"files/''\" alt=\"''\"/>');

    I do have a far more complicated set of code that does sort of the same thing with templates but I will only publish that if you are truly an experienced php and jQuery programmer. It can get very confusing trying to follow all the links if you don't understand the languages correctly.
  • hi,

    yes! onComplete is perfect for this. I used to use onAllComplete (since i upload only one file) but the file name missed me.

    thanx ;)

  • what about same file ?

    if I upload logo more than one, after second time previous uploaded logo is being displayed (uploaded file name is same for each process)

    any comment ?
  • if you want to keep the same filename it is likely to cause issues when you try to load the image. Such as what you are experiencing. You will need to look at two options

    1. set a cache-expires header on your page and look at reload code
    2. save the file with a new name. That way the browser wont pick up it's stored data.
  • if i remember correctly you can append timestamp after filename in src of img tag,
    that should make browser load image every time

    '<img src=\"files/' +'\"', '&amp;quot;') + '?ts=' + (new Date()).getTime() + '\" alt=\"' +'\"', '&amp;quot;') + '\"/>'