Topic
  • 3 replies
  • Latest Post - ‏2013-03-01T21:40:26Z by msoucy
msoucy
msoucy
337 Posts

Pinned topic EGL and browser caching issue with IE9

‏2013-02-11T14:31:30Z |
I'm running into a browser caching issue with my EGL application. The company I work for has standardized on IE for our browser and we've come across an issue with IE9 caching data. In one of my EGL applications I call an RPG program on our i5 which generates a PDF file on the IFS. When the job is done the user can click on a link in the EGL application to open the PDF document. If the user makes any changes on the web page and runs the RPG application again, then the PDF document would change. The problem is that when this happens the user clicks on the HTML link and the PDF document that comes up is the previous version even though the correct version is sitting on the IFS. The only way around this seems to be to change in Internet options in the browser to "Check for newer versions of stored pages: every time I visit the web page". My manager is against this option as he says it opens the door for "security issues". He says he wants to solve this programmatically. I've tried inserting the following HTML code into my JSP page but it doesn't seems to solve the problem.

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

Does anyone else have any suggestions on how to fix this issue?
Updated on 2013-03-01T21:40:26Z at 2013-03-01T21:40:26Z by msoucy
  • SystemAdmin
    SystemAdmin
    6195 Posts

    Re: EGL and browser caching issue with IE9

    ‏2013-02-11T15:16:03Z  
    Try to add this line:

    <meta http-equiv="cache-control" content="private, no-store, no-cache, must-revalidate, max-stale=0,post-check=0, pre-check=0">
  • SystemAdmin
    SystemAdmin
    6195 Posts

    Re: EGL and browser caching issue with IE9

    ‏2013-02-18T03:50:10Z  
    Try to add this line:

    <meta http-equiv="cache-control" content="private, no-store, no-cache, must-revalidate, max-stale=0,post-check=0, pre-check=0">
    If the above doesn't work, try adding a "?unique_value" to the end of the url. It will trick the browser into thinking it's a new PDF file.

    Here is an example from one of our functions.

    function outputCSV(nameOfFile string in, link string in, retResult ErrorRecord in)
            uniqueStamp = DateTimeLib.currentTimeStamp();
            uniqueURLSuffix = "?" + _userRecord.sessionID + "_" + uniqueStamp;
            if(retResult.isError)
                showServiceErrorMessage(retResult);
            else
                _nameOfFile = nameOfFile;
                FILE_NAME_INPUTFIELD.children =[new Hyperlink{text = nameOfFile + labels.HUD_FILE_DOWNLOAD_INSTRUCTIONS, target = "_blank", href = link + uniqueURLSuffix}];
                unlock_HUD();
                infobus.publish("remove.grey.box", null);
            end
        end
    
    Updated on 2014-03-25T04:36:11Z at 2014-03-25T04:36:11Z by iron-man
  • msoucy
    msoucy
    337 Posts

    Re: EGL and browser caching issue with IE9

    ‏2013-03-01T21:40:26Z  
    It seems that everything I have tried doesn't work. My manager has agreed in the mean time to turn off browser caching at the server level until we can figure out a way around this programmatically. Thanks everyone for the help!