Cache problems with h:graphicImage

Hi,
I use a website to manage pictures. The user can choose between 5 picture (in edit mode) and after he submit the new picture it should be shown on the picture.jsp. But if I reload the page after the submit (in session or request Scope) I got the old, cached picture. Is there a way to force a "browser-reload" of my images or the whole picture.jsp to get the correct image?
I draw my images with h:graphicImage
Thnx
Alex

First doublecheck if the image is actually renewed at
the server and that the new image is retrieved
after writing the new image to the disk.
If anything at the serverside seems OK, then this is
just a clientside caching issue. Add the following
lines to the HTML head to disable clientside
caching:
<meta http-equiv="cache-control"
content="max-age=0, must-revalidate, no-cache,
no-store, private">
<meta http-equiv="expires" content="-1">
<meta http-equiv="pragma" content="no-cache">
BalusC, won't these headers apply to the request that returns the HTML, not the subsequent request that returns the image?

Similar Messages

  • Caching problem with iFS web server / index.html

    There seems to be a problem with the iFS Java web server serving cached index.html documents after they have been modified.
    This only happens when the document is referenced by the folder name (e.g. /home/kennu/). If you reference it by the full name (/home/kennu/index.html), the new modified version comes up alright.
    I wonder if this is a bug or some kind of a feature? Is there an quick and easy workaround?
    Byt the way, is this the correct place to post bug reports? I didn't see iFS mentioned in the OTN Bug Database.
    null

    well, this is certainly not an intended effect. i'll look into it. in the meantime, the workaround already posted should pull you through.
    sorry about the inconvenience.
    -ilya
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Kenneth Falck ([email protected]):
    There seems to be a problem with the iFS Java web server serving cached index.html documents after they have been modified.
    This only happens when the document is referenced by the folder name (e.g. /home/kennu/). If you reference it by the full name (/home/kennu/index.html), the new modified version comes up alright.
    I wonder if this is a bug or some kind of a feature? Is there an quick and easy workaround?
    Byt the way, is this the correct place to post bug reports? I didn't see iFS mentioned in the OTN Bug Database.<HR></BLOCKQUOTE>
    null

  • Caching problem with Internet Explorer

    Hi,
    users of an ApEx application I'm working on are reporting that when they're deleting an uploaded file from one of the pages in the application (using Internet Explorer), the link to the file remains. This is however not an issue in FireFox, and after some research I found out that this is a caching problem in IE. It can be avoided by making IE check for newer versions of stored pages every time a page is visited, but it is clearly not an option to ask all our users to do this. I also learned that it can be fixed by randomizing the file URL every time the page is loaded, but I don't know how to randomize a URL, nor how to make it still point to the uploaded file.. Any help would be appreciated!
    Thanks,
    -Kjetil

    Kjetil,
    This problem is also there if you use Flash Charts with a drilldown. See this posting:
    http://www.deneskubicek.blogspot.com/
    It will also link you to a corresponding thread and to an example in my demo application.
    The idea with a random number changing you link is the same I used in extending my
    xml chart package.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • ASO cache problem with Windows 7

    I have a large base of AS2 classes that support my application.  I've been working on it for a few years and I'm very familiar with the ASO cache problem that causes edits to not be compiled.  Well, I hit it today and I can't get rid of the old files.  I'm running CS5.5 and I used the menu first.  Then I manually deleted the ASO files.  Then I rebooted the computer and searched the entire C: drive for ASO files and deleted all of them.  Nothing worked.  I finally renamed one of my class files (and the the necessary edits that flowed therefrom) and that one file was recompiled. Obviously there is a hidden cached file somewhere.  I have Win7 Pro 64-bit.  Has anyone had a similar problem?  The last thing I want to have to do is rename all of my class files or tear down and rebuild my development box.  TIA

    3.1 is not "fine" and the drivers leave much to be desired.
    You will probably need to do a Safe Mode and uninstall, rollback, system restore. Use your DVD for Windows 7.
    Not sure of the support issues and details on MacBook Pro 13" as to whether you have graphic driver issue, AppleHFS, or other (and to say 'total hangup' doesn't really lead to what and why).

  • Cache problem with bigger files in Flash 15

    Hello,
    I'm playing some MMORPG game. Since two days I have problem with entering one map, it always load from server, not from my cache like other ones.
    I've talked with developers, they didn't change anything, and the only thing that makes this map special is it weight. Other game files are small, this one is biggest, it weight 15 mb.
    Is any option that I can change to cache it? Or it is some bug?
    Hope you will help me.
    Regards.

    I have the exact same problem, but with an MMO game of 1.7Mb. Clients with the newest chrome/flash cant cache the game in the browser. If I configure Chrome to use the system flash player (v14), the game files are cached as always did. The problem seems to be related with the flash 15 embedded in Chrome.
    The strangest thing is that if I create a separate html page and embed the SWF there, it seems to be cached fine. But in the original dynamic page where the game needs to be embedded it doesn't get cached.
    rzuffi, did you try embedding your flash in an static html file?
    Regards

  • Cache problem with one site

    I have a problem with not getting the latest version of a page on one site (that I am aware of).
    I can get the latest version of http://www.thefa.com/thefacup/more/competition-bulletins on IE but Firefox gives me a page that hasn't been updated. Attached file 1 shows the Firefox cache entry, file 2 shows the page displayed on FF and file 3 shows the page on IE.
    This has been a problem with that page since I started using FF over a year ago.
    The only way to get the latest version is to "reload the current page" which is not a major problem but is annoying.
    Is this likely to be happening with other pages that are not so obvious or is it some incompatibility between that page and FF?

    I disabled cookies and deleted the existing ones for this site but it didn't make any difference - I didn't expect it to.
    I didn't try "forgetting" the site as my understanding is that this just clears the cache and cookies at that time but it doesn't stop them being saved again.
    Is there a way of not caching a specific site? If not, I'll just continue to "reload the current page" when I need to.

  • Cache problem with IE !

    Hy Guys,
    I've got a problem with the cache management in (my dear) Internet Explorer 7 :
    I've got a report page, with a list of records and in this list a link to a details page. In this page i could update my record, save it and go back to the first page. When I return to my page 2 (record's details) the value I have updated before is always set to the old value. Whereas the update is done in the database ...
    This problem only happens under IE and not under mozilla ...
    When I refresh my page (F5), the old value is erased and the new value is loaded and displayed.
    IE : V6.0 or V7.0
    Mozilla : V3.0
    APEX : 3.0.1.00.08
    All these versions are required by the customer, so I can't change it ...
    PS : excuse for my english, I'm french and I do my best !
    Thanks for you answers !

    You're welcome

  • Cache problem with "videos" viewed by thumbnail ?

    Hello,
    When I add video clips to my iTunes library, I have to crite the name of the author, the album... but sometimes display in the video view seems not to refresh : the clip are still listed without albums. I added clips 4 days ago, it refreshed immediately. I added clips three days ago, it still has not refreshed. I added clips two days ago, it took one day to refresh.
    I tried changing view, changing album name, nothing work.

    This is due to a bug in Flash Player 9.0.115.0, released on
    12/3/07.
    Techsmith, the company that produces Camtasia, reported the
    problem to Adobe a few months ago, but Adobe has not released an
    update for it. Adobe suggested downgrading to an older version of
    Flash Player, but older versions of Flash Player have security
    vulnerabilities that could result in your computer being attacked.
    Incidentally, Player 9.0.115.0 is classified as a "critical update"
    by Adobe.
    Techsmith has released a patcher to fix affected Camtasia
    videos, but the fix must be applied to the files on the server (all
    of the Camtasia files) and can't be used by viewers. The problem
    with Player 9.0.115.0 affects more than just Camtasia videos, of
    course.
    Until a newer version of Flash Player is released, you
    probably just need to live with it unless you're willing to risk
    the security holes in older Player versions. We're coming up on
    three months since Player 9.0.115.0 was released. Given the long
    delay in fixing the problem, and since Techsmith claims that Adobe
    has made fixing the problem a high priority, it's possible Adobe's
    engineers can't find a fix. Only time will tell.
    For more information, search this forum for "Flash Player
    & Camtasia Studio", "Player 9.0.115.0 MP3 issues", and "flash
    player audio chirps and video delays". For confirmation of the
    security flaws, search the web for "apsb07-20".

  • Solaris 10 NFS caching problems with custom NFS server

    I'm facing a very strange problem with a pure java standalone application providing NFS server v2 service. This same application, targeted for JVM 1.4.2 is running on different environment (see below) without any problem.
    On Solaris 10 we try any kind of mount parameters, system services up/down configuration, but cannot solve the problem.
    We're in big trouble 'cause the app is a mandatory component for a product to be in production stage in a while.
    Details follows
    System description
    Sunsparc U4 with SunOS 5.10, patch level: Generic_118833-33, 64bit
    List of active NFS services
    disabled   svc:/network/nfs/cbd:default
    disabled   svc:/network/nfs/mapid:default
    disabled   svc:/network/nfs/client:default
    disabled   svc:/network/nfs/server:default
    disabled   svc:/network/nfs/rquota:default
    online       svc:/network/nfs/status:default
    online       svc:/network/nfs/nlockmgr:default
    NFS mount params (from /etc/vfstab)
    localhost:/VDD_Server  - /users/vdd/mnt nfs - vers=2,proto=tcp,timeo=600,wsize=8192,rsize=8192,port=1579,noxattr,soft,intr,noac
    Anomaly description
    The server side of NFS is provided by a java standalone application enabled only for NFS v2 and tested on different environments like: MS Windows 2000, 2003, XP, Linux RedHat 10 32bit, Linux Debian 2.6.x 64bit, SunOS 5.9. The java application is distributed with a test program (java standalone application) to validate main installation and configuration.
    The test program simply reads a file from the NFS file-system exported by our main application (called VDD) and writes the same file with a different name on the VDD exported file-system. At end of test, the written file have different contents from the read one. Indeep investigation shows following behaviuor:
    _ The read phase behaves correctly on both server (VDD) and client (test app) sides, trasporting the file with correct contents.
    _ The write phase produces a zero filled file for 90% of resulting VDD file-system file but ending correctly with the same sequence of bytes as the original read file.
    _ Detailed write phase behaviour:
    1_ Test app wites first 512 bytes => VDD receive NFS command with offset 0, count 512 and correct bytes contents;
    2_ Test app writes next 512 bytes => VDD receive NFS command with offset 0, count 1024 and WRONG bytes contents: the first 512 bytes are zero filled (previous write) and last 512 bytes with correct bytes contents (current write).
    3_ Test app writes next 512 bytes => VDD receive NFS command with offset 0, count 1536 and WRONG bytes contents: the first 1024 bytes are zero filled (previous writes) and last 512 bytes with correct bytes contents (current write).
    4_ and so on...
    Further tests
    We tested our VDD application on the same Solaris 10 system but with our test application on another (Linux) machine, contacting VDD via Linux NFS client, and we don�t see the wrong behaviour: our test program performed ok and written file has same contents as read one.
    Has anyone faced a similar problem?
    We are Sun ISV partner: do you think we have enough info to open a bug request to SDN?
    Any suggestions?
    Many thanks in advance,
    Maurizio.

    I finally got it working. I think my problem was that I was coping and pasting the /etc/pam.conf from Gary's guide into the pam.conf file.
    There was unseen carriage returns mucking things up. So following a combination of the two docs worked. Starting with:
    http://web.singnet.com.sg/~garyttt/Configuring%20Solaris%20Native%20LDAP%20Client%20for%20Fedora%20Directory%20Server.htm
    Then following the steps at "Authentication Option #1: LDAP PAM configuration " from this doc:
    http://docs.lucidinteractive.ca/index.php/Solaris_LDAP_client_with_OpenLDAP_server
    for the pam.conf, got things working.
    Note: ensure that your user has the shadowAccount value set in the objectClass

  • Cache problems with Safari

    I am using a G4 powerbook running OS 10.4.10 and Safari 2.0.4. My home page is My Yahoo which contains a number of links to news articles. After reading a link and hiting the back button to return to My Yahoo, I usually get an day or two old version of My Yahoo which reaquires a resume button hit to get the correct date. I presume this is an old cached version of My Yahoo. How can I get Safari to cache the current page and return to it?

    Hi
    Cache problems can either be driven by a cache file that needs to be emptied or trashed.
    The former is done by going to the Safari Menu>Empty Cache. The latter requires you go to the Finder: HD>Users>Your User Account>Library>Caches. There, move the Safari folder to the trash and restart Safari.
    Try the first suggestion. If no relief, then the second.
    Let me know how you make out.

  • Mail attachment image caching problem with C7

    Using C7-00 and Mail for Exchange with up to date software. I received two Mobile Boarding Pass emails from Lufthansa for my flights. These emails contain barcode.gif as an attachment that one can show at the gate when boarding. Now the two emails contain attachment with same name (barcode.gif) and the images are equal in size too. The problem is that for the second mail the phone shows the attachment of the first email!
    I have read that Symbian^3 has for performance reasons aggressive image caching feature. But in this case this causes a real nasty bug!
     - Juha

    I have found a solution.
    In the IMG src tag we had been using /images/gfx/image.gif
    By changing this to /./images/gfx/image.gif the images are no longer cached and update immediately when changed.
    PQ

  • Cache problems with the browser

    I'm using google chrome browser to debug my flex/flash applications.
    problem is that a lot of times the browser will not load the newest build!
    how do I force it to load it?
    anyone?
    Peter Wraae Marino

    Hi guys,
         I ran into the same problem that you have with Chrome Cache, I also tried everything said in this post, and they all didn't work. But then it seemed possible to solve this issue by installing Click&Clean extension in Chrome. After installing Click&Clean for the first time, a settings window appears, in "Clear Private Data When Browser Closes" click "Chrome", then uncheck all but "Empty the Cache", then uncheck "Ask me before clearing" and close the settings window.
         After that, in Chrome Options choose "Under the hood" tab, then click "clear browsing data...", then uncheck all but "Empty the cache", then check if "clear data from this period" is set to "last hour", Finally close Chrome Options window.
         This solution clears all cached swf files automatically when the browser is closed without affecting your browsing history, cookies, or saved passwords. The drawback is that cached images and web content (for the last hour) are all cleared too, but google Chome is the fastest browser in loading contents on earth , so it should not be a big problem.
    Please note that Chrome sometimes fails to display the latest build, in that case just refresh the page after a while, and it will work.
    Regards,
    Haydex Kadhim,
    Researcher - Iraq.
    Message was edited by: dr_haydex

  • Waas caching problem with zip files

    hi,
    When we send same zipped file to branches, waas does not cache that file, without zipping waas caches the file. Is there any restrictions for zip file?

    Hi Muhammed,
    When you say that WAAS is not caching, I guess you mean that the optimization achieved is much lower than without zipping the file. Am I correct?
    If that is the case, then, I'm afraid it's the expected behavior. The cause for this is DRE
    In general terms, the way DRE works is by caching small chunks of a file. Later on, when these chunks are seen again in the file (either in the same connection or subsequent ones), they will not be transferred through the WAN link and instead, a chunk identifier (very small) will be sent. The problem is that all compression algorithms work in a similar way, removing repeating parts of the file to make it smaller.
    The result is that, any file that is encrypted/compressed has almost no repeating patterns in it, and therefore, even though DRE is applied, the reduction ratios are minimal, sometimes even getting to the point of making transfer even slower than without it.
    As a general good practice, if you are using WAAS to optimized your data transfers, make sure that the files you are transferring are neither compressed nor encrypted. This way you will get the maximum optimization ratios out of WAAS.
    I hope this answers your question
    Daniel

  • Cache problem with Image

    Hi,
    I have an applet that load an image from our server. The loading is fine, the user can see the image and navigate away from this page. After this, another user modify the image. If the first user re-open the applet (without closing the browser / JRE) the image is still the first one.
    The user need to close the browser to be able to see the new image. The first image is in the Java cache. I could disable it, but I could do this for all users. So my question is, how can I force the applet to fetch the imag each time instead of taking it from the JRE cache?
    I tried to load the image with Toolkit getImage and I read somwhere that I should use Toolkit createImage to avoid the cache. That didn't work, so I read somwhere else that I should use ImageIO. What I did without any success. I even tried to make the read process by myself with an InputStream reading it byte by byte... Nothing to do!!
    I'm not able to find any informations... if somebody could give me a hint!!!?
    Thx a lot

    Try aiming this at your image:
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class ImagePanel extends JPanel {
        private static final long serialVersionUID = 0;
        private URL url;
        private JLabel label;
        private ActionListener al = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                reloadImage();
        public ImagePanel(URL url) {
            this.url = url;
            label = new JLabel();
            add(label);
            setBorder(BorderFactory.createTitledBorder(""));
            reloadImage();
            new Timer(1000, al).start();
        public void reloadImage() {
            try {
                label.setIcon(new ImageIcon(ImageIO.read(url)));
                setBorder(BorderFactory.createTitledBorder(new java.util.Date().toString()));
            } catch (IOException e) {
                e.printStackTrace();
        //testing main
        public static void main(String[] args) throws MalformedURLException {
            URL url = new URL("http://blogs.sun.com/jag/resource/JagHeadshot-small.jpg");
            ImagePanel panel = new ImagePanel(url);
            JFrame f = new JFrame();
            f.getContentPane().add(panel);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }If you run it as a standalone app, do you see the image refreshing?
    If you add an instance of ImagePanel to your applet, what then?
    The timer driving image reloading was just for convenience. You could
    comment out the timer and explicitly reload by calling reloadImage when needed.

  • IP Cache problem with Safari when browsing from Google

    I've been experiencing what appears to be an ARP Cache corruption problem when using Safari. It typically occurs when I've been browsing links off of a Google Search page. Tonight's specific example is where www.youtube.com is now resolved to wikipedia.com's ip address. The only way to fix the problem (short of a reboot) is to shut down the network interface and then restart (after waiting a few seconds)
    This normally fixes the problem (which is why I think its the ARP cache.)

    This sounds like it could be related to a problem between Safari 5's DNS prefetching and your router. It may be possible that your router is scrambling DNS replies. Could you try manually entering a known good DNS server like OpenDNS into your network prefs?

Maybe you are looking for