Defeating browser jar cacheing

I have a client whose customers use a couple of applets I wrote for the client and I need to make some improvements (new features) to said applets.
Before I go any further I should say that the user base in this case is best described as "dumb as mud". So this has to be idiot proof.
One of the changes means that data which is now fed in as parameters will instead be loaded dynamically by the applet. So some of the parameter tags will change and of course if the applet is cached then I have problems.
I know that a simple browser restart would fix it but again my experience with this user base suggests that many will leave the browsers open forever it seems and they don't seem to read instructions like if you have problems restart your browser. Instead they complain to the client who will in turn give me grief.
So if I wanted to make sure that I am getting a new jar there without restarting a browser I can think of two possible solutions or variants of.
1) Change the name of the JAR.
2) Change the package names.
I know that it (the browser) doesn't look at the date of the jar but I guess it would be fooled by a name change. I am hoping so. Changing the package names would do it for sure but that seems like such a piece of hackery.
And to answer the two most common questions I would ask if I saw this post...
I can't really do it myself because I really want to make sure that it works across platforms and browsers. I mean I can test a few things but my nightmare scenario is that I do and it works for me and then when I deploy users with system X have problems.
Google searching only seemed to point me at using my own ClassLoader which seems like an unpleasant work around.
So... do I need to change the names of the packages? Does anyone know any tips, tricks or quirks for doing this? Any insight would be most helpful.

Take a look at the Java Plugin Developers Guide.
You don't say what Java version, but Java 5 has an
Applet Caching topic that should be able to do what
you want - though it may be too much to iimplement it
this is a one-time thingy.Oh sorry it's 1.3 and up. Some users have 1.4 but when the initial set up for some of the users was done (on site) it was 1.3.
I will take a look at that anyway because it may well be helpful in getting some ideas.

Similar Messages

  • Information on Java JAR cacheing

    I'm just looking for an explanation of the jar caching procedure. I had a jar on a clients PC (behind a cahing proxy), and although I updated the jar on the web server, the browser kept on displaying the old jar, I had the client cache as well as proxy cache cleared, with no change. This was only occuring on the pc's behind the proxy.
    The only solution was to create a new jar name, and update the HTML to look for the completely new jar name.
    Any ideas on where the browser was loading the jar from, and how can it be cleared.
    Thanks for the input

    Once the JVM is started by a browser it is never stopped, until all browser windows are closed (and the browser process exits). The JVM is responsible for the loading and caching of jars. You need to clear the JVM's cache.
    Typing 'x' in the Java2 plugin's console window will do this. I'm not sure how other JVMs work.

  • Possible to check in Java, if if a package is already in the jar-Cache?

    I have an applet, that has only one main.jar in the Cache-Archive parameter.
    Because I wanted to reduce the preload-Time, since 1.4.0 I use an index.list file, listing
    the rest of jar-Files needed for my applet. So the jar-Files will be only
    downloaded to the time, they are needed, if they aren't already in the jar-cache.
    The Problem: If the applet needs a new jar-File, that isn't in the jar-Cache, it needs
    time to download the package. But the user doesn't see that something happens.
    Is it possible to check with JAVA in the applet, if a package is already in the jar-Cache?
    If i know this, I'll be able to show the user that the applet is currently downloading a package.

    do u mean a file in the JAR?
    if yes, yes u can check that.
    check this,
        public ImageIcon loadImage(String location)
    java.net.URL url =  null;
    url = getClass().getResource(location);
    if (url == null) then ...
        } 

  • OBIEE 11g: how to automate browser clearing cache

    Hi,
    We upgraded OBIEE 10g to 11g the implementation includes EBS SSO ( which works in 10g).
    the SSO functions OK meaning when we login from ERP Bussiness selection responsibilities to the OBIEE dashboard page we can access it and the login succeed.
    The thing is that when we change the responsibility to another responsibility the Application role of the user does not updated and the old role ( the user get again the first role that was assigned in the first login ) meaning the role was not changed with the new responsibility.
    I think that browser cache find OBIEE session and connect to the session without call /* valueof(NQ_SESSION.ACF) */ APP_SESSION.validate_icx_session('valueof(NQ_SESSION.ICX_SESSION_COOKIE)')
    So, to automate browser clearing cache ?
    Thank you

    Thank you Veeresh,
    I think this situation is due to a feature of Weblogic
    "+The browser caches user credentials and frequently re-sends them to the server automatically. This can give the appearance that WebLogic Server sessions are not being destroyed after logout or timeout. Depending on the browser, the credentials can be cached just for the current browser session, or across browser sessions.+"
    [http://docs.oracle.com/cd/E23943_01/web.1111/e13711/thin_client.htm#i1033402].
    I understand the advantage that helps to not make the login process more unnecessary. But I have to disable the feature, otherwise the end-user will not be able to change permission on BI /ERP responsibility and will have totally close the browser. The question is how to disable it (Weblogic feature) ?
    Thank you,
    Ark

  • 1.4.2_01 and 1.4.1_01 jar cache doesn't seem to be working

    I am having a hard time getting the .jar cache to work with the 1.4.2_01 and 1.4.1_01 plugins.
    Here is my applet:
    ====================================================================
    import java.applet.Applet;
    import java.awt.*;
    public class TestApplet extends Applet {
         public void init() {
    setLayout(new BorderLayout());
              setForeground(Color.blue);
              setBackground(Color.white);
         Label label = new Label();
    String resourcePath = "/" + this.getClass().getName().replace('.','/') + ".class";
    String source =this.getClass().getResource(resourcePath).toString();
    System.out.println(source);
    label.setText(source);
              add(label,BorderLayout.CENTER);
    ====================================================================
    You will need to compile this class and put it in a TestApplet.jar file in the same directory that the html file is in. Delete TestApplet.class just for good measure.
    And here is the html that loads it up:
    ====================================================================
    <HTML>
    <BODY>
    <APPLET CODE="TestApplet" NAME="TestApplet" WIDTH="750" HEIGHT="50" CODEBASE="." >
    <PARAM NAME="cache_archive" VALUE="TestApplet.jar">
    <PARAM NAME="cache_version" VALUE="1.1.1.2">
    <PARAM NAME="cache_option" VALUE="Plugin">
    </APPLET>
    </BODY>
    </HTML>
    ====================================================================
    Now, I hope that I'm missing something really stupid here, but when I run this with the 1.3 plugin, the applet clearly states that the class file is loaded from the cached .jar file. For example, it prints out that the class file was loaded from:
    jar:file:/C:/WINNT/Profiles/xxxx/java_plugin_AppletStore/1.3.1_09/jar/TestApplet.jar19890069901.1.1.22036068943678200358.jar!/TestApplet.class
    But when I run this code with the 1.4.2_01 or 1.4.1_01 plugin I get this:
    jar:http://localhost/TestApplet.jar!/TestApplet.class
    and my access log files show this file getting loaded over and over and over again. Using the cached_archive_ex param doesn't help either.
    This is a over simplified example of a problem that is forcing my huge applet to run at 1/3 to 1/4 the speed that it should because of class loader thrashing due to excessing jar file loading.
    Have I missed something obvious?
    Thanks
    Andy

    Hi,
    i don't know but i encountered the same caching problems when plugin version 1.4.2_01 is used.
    Facts:
    -> jar Size: 1MB
    -> Added Parameters:
    <PARAM NAME="cache_archive" VALUE="xxxx">
    <PARAM NAME="cache_version" VALUE="4.1.1.266">
    <PARAM NAME="cache_option" VALUE="Plugin">
    -> Cache is set to unlimited
    No matter if jar-File is already stored in the cache the parameter "Cache-Control: no-cache" is set in the HTTP-Header.
    I have not found anything preventing this yet.
    Cheers
    Thomas

  • How to stop the Browser from caching my web pages

    Hi There
    Can anyone tell how to stop the browser from caching my jsp pages
    I am using
    <%response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    but this does not work anduser is able to go back to the previous page
    which i dont want and i want the browser to display the message the page has expired
    Help appreciated
    Thanks
    Mumtaz

    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
    I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
    Srinivasan Ranganathan

  • Error unable to create jar cache in /tmp directory!

    I using tomcat4.0.2,but when I start the tomcat from %catalina_home%/bin using startup.bat, in the startup console printing "error unable to create jar cache in /tmp directory: java.io.IOException: System cant find the direct", and tomcat can be started, no problem when I access my web application.
    Why it happened?
    But if I start tomcat from startup menu of the system instead of using startup.bat, no error is thrown.

    anyone know it? Please tell me.
    I was puzzled about it.
    TIA

  • Turning off jar cache causes classnotfound with signed jar files

    Hi,
    I have a problem with applet signed jars when the java cache is turned off.
    With the cache turned off, I get a class not found for the first class it attempts to use from the signed jar file from an applet.
    If I turn the jar caching on, all works perfectly with no other changes.
    Anyone have any ideas? This is java 6u16.
    Thanks

    jkc532 wrote:
    .. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? From your comprehensive investigation and report, it seems so to me.
    ..I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?Just after read the summary I was tired, so I have some understanding of the effort you have already invested in this (the 'wits' you have already spent). I think you should raise a bug report and seek Oracle's response.

  • Define location for "Oracle Jar Cache" of jinitiator

    Hello,
    I'd like to know is it posible to define the location of Oracle Jar Cache with some parameters like installing in silent mode....
    This problems has occured because we have for users files home directory on network file server and jinitiator automaticlly put Oracle Jar Cache on file server.
    For Example i'd like to have C:\Oracle Jar Cache
    regards,
    Tilen
    Message was edited by:
    Ttreven

    If you change the location of the jar cache via the console the location entry is written into a file in your local profile:
    Directory
    .jinit (for JInitiator)
    .java (for Java Plug-In)
    File
    properties<version_of_JInitiator or Java Plug-In>.
    Only modified entries are written to this file (otherwise the default is valid).
    You can modify this file programmatically after installation or possibly during installation process.

  • Preloading images to browser's cache

    Hi,
    I'm working on a flash gallery project where images are
    loaded through xml file.I have some buttons in the gallery for
    different categories of images to be shown. Is there a way to
    preload images to browser's cache prior to them being called.?,I'm
    using AS2.
    Thanks in advance...

    You can simply load images into an empty movieClip, off
    stage.
    Dave -
    www.offroadfire.com
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Rollout of Jinitiator - setup of Oracle Jar Cache

    Hi,
    We are planning an upgrade of Oracle e-business suite from 11.5.10.1 to 11.5.10.CU2 and with this we will also be upgrading our version of Jinitiator to 1.3.1.28. By default, the location of the Oracle Jar Cache is something like:
    C:\Documents and Settings\%NETWORK_NAME%\Oracle Jar Cache
    My question is: Is there a method whereby we can modify this default setting to something else, e.g. C:\temp\Oracle Jar Cache before we download the oajinit.exe to each individual pc. Ideally, I would like to configure this before the download and have the users simply download the oajinit.exe the first time they logon to 11.5.10.CU2. I appreciate that there are other ways that we can distribute the oajinit.exe to each users PC but just wondered if it was possible to configure the location of the Oracle Jar Cache before distributing.
    Thanks for any help you can give.
    Regards,
    Calum

    Check Note: 290592.1 - How To Customize Oracle Jinitiator Options Prior To Deployment?
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=290592.1

  • Jinitiator Question - JAR Cache Size Location

    Using Jinitiator 1.3.1.22 - on Windows 2000 Pro
    Does anyone know where this setting is stored on the PC when set in the Java Console? I have looked at the properties121222 in the .jinit folder under the User profile in Docs and Settings and it isn't in there!

    Thanks Francois...I know that bit. I want to know where the value for the default is actually derived from for my installation. According to the Forms Services Deployment Guide 'The default cache size for Oracle JInitiator is 20000000. This is set for you when you install Oracle JInitiator.'
    If you override the default in the Jini Configuration Panel, it's value will appear in a text file in the users .jini folder. Where is it held before that?!
    When Jini is installed at my workplace, the default for the JAR cache is 50mb. No one knows why and how it differs from what the documentation states! This is what I am trying to get to the bottom of!

  • Where's  the jar cache in Discoverer 10.1.2?

    Hi friends.. I'm trying to tind where the jar cache directory .. but I can't locate it...
    Not in my Windows PC..(by the way.. I haven't a jcache directory in my Program Files/Oracle/Jinitiator 1.3.1.31 folder), I mean in apps Linux server...
    Any ideas?
    I suppose that when notes talk about clear/delete jar cache directory for Discoverer they don't mean the COMMON_TOP/... directory... but i don't know exactly.
    Thanks,
    Jose L.

    Jose,
    The jar cache will be in the individual PC and will depend upon if you are using the Jinitiator or Sun JVM.
    Discoverer 10g uses Sun JVM by default unless you have configured Jinitiator.
    Any easy way to check is: Navitagate to: Start >> Control Panel >> Java (for SunJVM) >> General tab >> settings button (under Temporary Internet files)
    It will be something like (for 1.5 plugin)
    C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment\cache
    Similar steps for Jinitiator, but it will be under the 'cache' tab
    C:\Documents and Settings\<username>\Oracle Jar Cache
    You can also search your PC for files to fine the location.
    disco5i.jarjar*
    If a note tells you to clear the jar cache, then it is on the client PC.
    I had an old MetaLink note 367389.1 bookmarked that has some navigation steps and screen shots for you.
    Regards,
    Steve.

  • Convergence - problem enabling browser-side caching

    I am following the ["Enhancing Browser-Side Caching of Static Files" section of the Convergence Performance Tuning|http://wikis.sun.com/display/CommSuite/Convergence+Performance+Tuning#ConvergencePerformanceTuning-EnhancingBrowserSideCachingofStaticFiles] wiki document.
    I installed the class file
    -rw-r--r--   1 root     root        2724 Oct  2 08:50 /opt/SUNWappserver/domains/domain1/config/lib/classes/ExpiresFilter.classAnd I added the following to default-web.xml (just below the last </servlet-mapping>)
    <filter>
        <filter-name>ExpiresFilter</filter-name>
        <filter-class>iwc.ExpiresFilter</filter-class>
      </filter>
      <filter-mapping>
          <filter-name>ExpiresFilter</filter-name>
          <url-pattern>/iwc_static/js/*</url-pattern>
          <url-pattern>/iwc_static/layout/*</url-pattern>
          <dispatcher>REQUEST</dispatcher>
          <dispatcher>FORWARD</dispatcher>
      </filter-mapping>When I restart glassfish, I get this error in iwc_admin.log
    ADMIN: ERROR from com.sun.comms.client.admin.web.util.ConfigHelper  Thread pool-1-thread-4 ipaddress= sessionid= at 09:21:35,355- Error occured while loading the configuration from the file Parsing Error
    Line:    209
    URI:     file:/var/opt/wisc/wtcnv4/iwc/config/configuration.xml
    Message: cvc-complex-type.2.4.b: The content of element 'BackendServiceDetails' is not complete. One of '{Enable, EnableSSL, ServiceURI, Timeout}' is expected.
    ADMIN: ERROR from com.sun.comms.client.admin.web.util.ConfigHelper  Thread pool-1-thread-4 ipaddress= sessionid= at 09:21:35,355- Parsing error while loading configuration: Error occured while loading the configuration from the file /var/opt/wisc/wtcnv4/iwc/config/configuration.xml due to:  Everything works fine if I remove the <filter> stanza from the config.
    I'm guessing that it isn't loading the class correctly. Any ideas?

    jessethompson wrote:
    I am following the ["Enhancing Browser-Side Caching of Static Files" section of the Convergence Performance Tuning|http://wikis.sun.com/display/CommSuite/Convergence+Performance+Tuning#ConvergencePerformanceTuning-EnhancingBrowserSideCachingofStaticFiles] wiki document.
    What version of Convergence are you using (./iwcadmin -V)?
    I tried the steps with Convergence patch 10 (update 3) and Glassfish 2.1 (on Redhat Linux) and it worked fine -- I see "Expires" and "Cache-Control" headers for Convergence file requests.
    I installed the class file
    -rw-r--r--   1 root     root        2724 Oct  2 08:50 /opt/SUNWappserver/domains/domain1/config/lib/classes/ExpiresFilter.class
    The class file should be in:
    /opt/SUNWappserver/domains/domain1/lib/classes/iwc/Regards,
    Shane.

  • JRE jar caching - is there any trick to ignore IP address?

    Hello,
    I'm a developer of GUI solutions for TV and Radio transmitter networks. In a current project TV-Stations are accessible via Web Browser with (relatively large) applets embedded in HTML pages. We are using JRE Plugin V6.x, the applets are the kernel element at the client side. The solution works fine - the only (but big) problem is the loading time of the jar libs used by the applets. There is one lib with appr. 1.5 MBytes and the end-customers, e.g. the DVB/ATSC-Service-Providers have in some cases only slow modem connections to the Tx-Stations (may be anywhere on a big mountain..) with 9 kbit/sec transfer rate.
    Our Rich-Client-Solution ist optimized for small network bandwidths and works normally down to appr. 3 kbit/sec. The only problem is: the big jar-lib must be loaded before any communication may start. Of cause we strictly recommend our customers to enable caching - as it is by default - in SUN JRE plugin. But this helps not in each cases, because JRE caches each jar and other resources with the IP-address from where it have been loaded. It's prob. necessary for Java-included security, but bad for our applications.
    Imagine a typical scene: An ATSC-TV-provider "GoodLuckBObama.tv" ;) has 150 TX/antenna stations around the United States. Each station has a unique IP (normally also not within the same sub net). When "GoodLuckBObama.tv" byes the 150 transmitters from us there is the current firmware release installed - e.g. 3.6.7 Now the provider wants to access all the stations remote via Web Browser from one central office - may be in NY. He logs on to IP 123.89.78.3 in Miami - there is an ADSL connection with 8 Mbit/sec - the web UI opens and works immediately. Happy about this he wants to have a look at a station in the Rocky Mountains with IP 33.44.55.66 - there is a Modem connection of 64 kbit only. He waits 5 and more minutes - he closes the Browser, starts again.. - it seems so as there is a bug in the Rocky Mountain's stations firmware - he calls our support for help and it's told him: "..we're very sorry, but you must have a connection above 1 Mbit to use the Web UI, beyond there is only SNMP.." Or you must wait more than 1 hour to install the client-software on your PC.. And that’s only why JRE-Plugin loads the same jar (eg. rstxui-browsercli-jar-3-6-7.jar) again because it's assumed as an unknown new jar - not already cached. And.. - imagine furthermore that "GoodLuckBObama.tv" decided: ok, we're waiting 1 hour for our 20 stations docked on via modem. After this there's everything all right ...until the 1st software update in 2 months - the same desaster starts again... and the customer asks himself - WHY??
    I red with interest article "Applet Caching" in the JRE-Plugin developer guide - bit I didn't find a solution for the describe problem above.
    What we want is: if there is a jar with the same name, size, version.. already in cache, we won't that the plugin loads the same again - from any IP. Is there any way to get this behaviour? Can we sign up the jar-libs in any manner to make sure that "it's 100% the same - ignore location/IP"? Or - if nothing other helps - is it possible to modify the (now Open Source) src code of the J-Plugin to force the necessary functionality in a "legal way" without any problems with the underlying license conditions?
    I hope anybody can help me..
    Thanks

    Hi
    Deploying all .jars (except the applet .jar file) as standard extensions could help.
    [http://java.sun.com/j2se/1.5.0/docs/guide/plugin/developer_guide/extensions.html]
    I didn't test this myself but according to the doc, Java plugin evaluates the Extension-Name, Specification-Version, Implementation-Version and Implementation-Vendor-ID of an extension requested by an applet.
    If there is an installed extension that matches these criteria, Java Plugin will use it, otherwise the extension will be installed as specified in the applets MANIFEST file.

Maybe you are looking for

  • Verizon is a SCAM

    I really hate posting this but Verizon left me no choice. We signed up with Verizon in May of this year and it ended up being the biggest mistake of our lives. The following month we had a bill of over $400 which caught us by surprise but we learned

  • Do NOT use Dropbox for iPhoto backups - corrupted library

    So after a couple of weeks of problem solving I've just been able to recover part of my 72gb iPhoto library. My office was burgled a short while before Xmas so I was left to recover my stuff all from Dropbox which I have set to synchronise, together

  • How to use macro to pull data from custom infotype?

    Hi all, Is rp_provide_from_last p9004 space pn-begda pn-endda. works? i am getting all zeros . is using macros possible pull data from custom infotype? or only select? Regards sas For LDB PNPCE get peras:

  • Execute Query in different Window

    I want to execute query on block which is placed in different windows. I create two different windows A1 and B1 I want to execute Query on B1 while my cursor is on A1 and based on A1.item1.

  • How to change the user for an event job as SAP_MONITORING_STARTUP_DISPATCH

    Hi experts! We change the user that execute all our jobs. I can change the user JOB-BW for JOB-BI for this job SAP_CCMS_MONI_BATCH_STARTUP_DP, but the problem is when this job is executed by event for this other job SAP_MONITORING_STARTUP_DISPATCH, b