Client-side caching of Javascript (for Google Web Toolkit *.cache.* files

Hi all,
I'm trying out the use of Google Web Toolkit (GWT) for AJAX code development, leveraging RPC calling back-end Web Services for a document browser prototype.  When the JavaScript code is generated by GWT, it has the ability to automatically distinguish between cacheable and non-cacheable content via file extensions (.cache. and .nocache.).
Now when running in a Tomcat environment with appropriate caching settings; the application runs extremely fast even on really poor latency sites (>500ms round trip); however on a NetWeaver stack, I can't find any information on how to set an attribute on .cache. files to set an expiry of 1 year.
Anyone know how to do this on a NetWeaver J2EE stack?
Thanks,
Matt
PS. For reference, GWT is a very cool open source project worth watching in the Enterprise space for targeted high-usability, high performance apps.  Just the image bundles concept themselves are an awesome approach to minimizing impact of small images on performance.

Hi again,
I thought I should post the solution I came up with in case people search on GWT in the future.  In terms of caching, the Portal does a good job of making nearly everything that GWT produces to be cached at the client; and for the life of me, I couldn't get nocache files not cached at the client side. 
So thanks to my friendly local SAP experts in the portal space; I discovered there's not much you can do to get this working except try use standard browser tags like the following to prevent caching on the browser:
Note - Can't seem to save this post in SDN with Meta tags that I'm trying to display so check out http://www.willmaster.com/library/tutorials/preventing_content_cache.php for more info...
Unfortunately, the way that GWT creates the nocache files, it is not possible to modify the .js files to do this so I needed an alternative approach.
Then I thought, well, the html file that includes the JS file is cached, but it's not very big, so how about I just write a script to modify the html file when I deploy to production to point to the nocache file with a date suffix.
Let me explain in more detail:
1. The original html file that includes the nocache.js file gets modified to point to nocache.<date>.js.
2. The original nocache.js file gets changed to nocache.<date>.js
3. Now produce an external bat file to do this automatically for you before deployment which DevStudio can call as part of an Ant script or similar.
That's it.  So when you are developing, you can manually delete your cache, but just before you go to production, you do this conversion, and you will never have an issue with clients having the wrong version of javascript files. 
Note - GWT takes care of caching of most of the files by using a GUID equivalenet each time you compile, so it's just a couple of files that really need to not be cached.
Anyway, I'm not explaining this solution very well, but drop us a line if you need to understand this approach further.
And lastly, my feedback about GWT - It Rocks!  Everyone loves the result, it's easy to build and maintain, it offers a great user experience, and it's fast.  Not a replacement for transactional apps; but for the occasional user - go for it.
Matt
Edited by: Matt Harding on May 22, 2008 7:48 AM

Similar Messages

  • Possible to delete Offline Files content for a specific user from the Client Side Cache (CSC) ?.

    Hello Everyone,
    We would like to implement a script to delete the offline files in the Client Side Cache (CSC) for a nominated user (on Windows 7 x64 enterprise).
    I am aware that;
    1. We can use a registry value to flush the entire CNC cache (for all users) next time the machine reboots.
    2. If we delete the user's local profile it appears that Windows 7 also removes their content from the local CSC.
    However, we would like to just delete the CSC content for a particular nominated user without having to delete their local user profile.
    In our environment we have many users that share workstations but only use them occasionally. We don't use roaming profile so we would like to retain all the users' local profiles but still delete the CSC content for any users that haven't
    logged on in a week.
    Any ideas or info would be appreciated !
    Thanks, Makes

    Hi,
    I don't think this is possible.
    If you want to achieve it via script, I suggest you post it in official script forum for more professional help:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?category=scripting
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Karen Hu
    TechNet Community Support

  • Client-Side Caching of Static Objects

    Hi,
    We just installed SPS12 for NWs.  I learned of this new client-side caching of static objects while reading through the release notes, and I went in to our portal to check it out.  I went to the location where the <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/45/7c6336b6e5694ee10000000a155369/content.htm">release notes</a> (and an <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6622">article in the blog</a>) specified, System Administration > System Configuration > Knowledge Management > Content Management > Global Services.
    Problem is that I do not see Client Cache Service and Client Cache Patterns.  I enabled "Show Advanced Options," but I do not see those two configuration items.
    Does anyone know why I am not seeing those two configuration items and how I can get to those?
    Thank you.

    Hi,
    We are using SPS 12.
    KMC-CM  7.00 SP12 (1000.7.00.12.0.20070509052145) 
    KMC-BC  7.00 SP12 (1000.7.00.12.0.20070509052008) 
    CAF-KM  7.00 SP12 (1000.7.00.12.0.20070510091043) 
    KMC-COLL  7.00 SP12 (1000.7.00.12.0.20070509052223) 
    KM-KW_JIKS  7.00 SP12 (1000.7.00.12.0.20070507080500)

  • Client side caching

    Hi all,
    I wonder how client side caching (in memory) would work with BlazeDS.
    There was a project called FAST that would support client side caching for Remoting:
    http://www.adobe.com/devnet/flex/articles/fast_userguide.html, but this doesn't seem to work for Flex 3.
    Do I have to invent my own caching mechanism?
    Without client side caching support I don't see how an application build on BlazeDS remoting would ever scale to many users.
    Regards,
    Markus

    Hi Markus. I took a look at that FAST project. There isn't anything like that in BlazeDS currently. It probably wouldn't be too hard to port that code to make it work with Flex 3 but it's usefulness looks somewhat limited. There doesn't look to be any way to timeout a request that has been cached for example which I think most people would want. If you think this is something that would be useful you can log an enhancement request in Jira.
    http://bugs.adobe.com/jira/browse/BLZ
    As to your point about not seeing how an application built on BlazeDS remoting would scale, I think it's a fairly common practice to not expose functions to the end user that directly call backend services. It's pretty straightforward, for example, to request some data when the application loads and then refresh the data at some interval. You don't need a caching API to do this.
    -Alex

  • Where is "Google Web Toolkit Developer Plugin for Firefox?"

    I can not find this plug in for the version of Firefox I have 3.6.8, even though it already runs with it?
    I can not find Google Web Toolkit Developer Plugin for Firefox for Firefox 3.6.8 even though I already have Google Web Toolkit Developer Plugin for Firefox running on a version of Firefox 3.6.8 on other computers.
    # There is no regular information that tells you how to get this plugin as there is with other plugins.
    # When GWT Devmode loads the Firefox brower, it says "missing plugin." you click to install, and it can't find it.
    # I know that I have previously been able to install Google Web Toolkit Developer Plugin for Firefox version 1.0.7511 installed on Firefox 3.6.8 on another machine. But I'm migrating to this one.
    (Edited to correct the formatting to stop the post scrolling to the right - TonyE)

    Hi richkatz,
    I'm on FF3.6.2 and today, I encounter the same problem.
    I got the solution by opening the download page in another tab. Then the firefox message switched from "Look for Plugin" to "Autorise FF to install the plugin".
    Here is the URL of my new tab, hoping that it works for FF3.6.8 : https://dl-ssl.google.com/gwt/plugins/firefox/gwt-dev-plugin.xpi
    Seeya! ;)

  • Firefox 6 doesn't support Google Web Toolkit add-on so has become useless to me.

    Thanks for forcing an upgrade. You need to understand that you will turn people OFF if you force them to upgrade to a platform that is not ready for their full requirements! I can no longer be a Firefox user. Can I go back to my previous version? How?

    Looks like the problem is with Google having not released an update yet. See the following link and links within: https://groups.google.com/group/google-web-toolkit/browse_thread/thread/48d34a9fb54af7e6/ddb748430950f08a
    Here is a link within that article re: a patch for Firefox 6: https://gwt-code-reviews.appspot.com/1523805/
    As Firefox 5.0 and 5.0.1 have unpatched vulnerabilities, I will not provide a link here. Click Inbox at the top right of this forum when you are signed-in to the forum for a message to you.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Why i am I getting Error (5,8) TestCas for a Web Service Test File Generate

    why i am I getting the following error for a Web Service Test File Generated by jdeveloper when i run it:
    Error (5,8) TestCase not Found
    Error(12,14):constructor Object(java.lang.String) not found in java.lang.Object

    actually i removed that error by added the junit.jar to my libraries but i am getting a new error when accessing the webservice with a Jdev generated web service proxy:
    WARNING: Unable to connect to URL: https://mytest.test.com/WebService/MyTest_1.0/soap.soap due to java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
    java.rmi.RemoteException: ; nested exception is:
         HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
         at project7.proxy.runtime.MyTestSoapBinding_Stub.echoOfficeLocation(MyTestSoapBinding_Stub.java:11977)
         at project7.proxy.MyTestClient.echoOfficeLocation(MyTestClient.java:1276)
         at project7.proxy.MyTestClient.main(MyTestClient.java:38)
    Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused: connect
         at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:174)
         at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:150)
         at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:176)
         at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:113)
         at project7.proxy.runtime.MyTestSoapBinding_Stub.echoOfficeLocation(MyTestSoapBinding_Stub.java:11961)
         ... 2 more
    Process exited with exit code 0.
    looks like something to do with the certificate or keystore... how do you add the keystore to JDev.. i tried the JDK cacert but that doesnt work...

  • SharePoint 2013 Client Side People Picker in Content Editor Web Part

    Has anyone tried to use the client side people picker in a content editor web part? I have successfully got it to work in IE by adding all the script references and initialize function to the content editor web part. Now the strange part is, the people
    picker doesn't render in other browsers, I tried in Chrome, Safari, and Firefox. Any ideas?

    Below can be used to create people picker in CEWP
    <asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js" type="text/javascript"></script> 
       <script type="text/javascript" src="../Apps/_layouts/15/clienttemplates.js"></script> 
       <script type="text/javascript" src="../Apps/_layouts/15/clientforms.js"></script> 
       <script type="text/javascript" src="../Apps/_layouts/15/clientpeoplepicker.js"></script> 
       <script type="text/javascript" src="../Apps/_layouts/15/autofill.js"></script> 
       <script type="text/javascript" src="../Apps/_layouts/15/sp.js"></script> 
       <script type="text/javascript" src="../Apps/_layouts/15/sp.runtime.js"></script> 
       <script type="text/javascript" src="../Apps/_layouts/15/sp.core.js"></script> 
       <script type="text/javascript">
    <!-- Add your CSS styles to the following file -->
    <link rel="Stylesheet" type="text/css" href="../SiteAssets/PeoplePicker/App.css"/>
    <!-- Add your JavaScript to the following file -->
    // Run your custom code when the DOM is ready.
    $(document).ready(function () {
        // Specify the unique ID of the DOM element where the
        // picker will render.
        initializePeoplePicker('peoplePickerDiv');
    // Render and initialize the client-side People Picker.
    function initializePeoplePicker(peoplePickerElementId) {
        // Create a schema to store picker properties, and set the properties.
        var schema = {};
        schema['PrincipalAccountType'] = 'User,DL,SecGroup,SPGroup';
        schema['SearchPrincipalSource'] = 15;
        schema['ResolvePrincipalSource'] = 15;
        schema['AllowMultipleValues'] = true;
        schema['MaximumEntitySuggestions'] = 50;
        schema['Width'] = '280px';
        // Render and initialize the picker. 
        // Pass the ID of the DOM element that contains the picker, an array of initial
        // PickerEntity objects to set the picker value, and a schema that defines
        // picker properties.
        this.SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, null, schema);
    // Query the picker for user information.
    function getUserInfo() {
        // Get the people picker object from the page.
        var peoplePicker = this.SPClientPeoplePicker.SPClientPeoplePickerDict.peoplePickerDiv_TopSpan;
        // Get information about all users.
        var users = peoplePicker.GetAllUserInfo();
        var userInfo = '';
        for (var i = 0; i < users.length; i++) {
            var user = users[i];
            for (var userProperty in user) { 
                userInfo += userProperty + ':  ' + user[userProperty] + '<br>';
        $('#resolvedUsers').html(userInfo);
        // Get user keys.
        var keys = peoplePicker.GetAllUserKeys();
        $('#userKeys').html(keys);
    </script>
    </asp:content> 
    <asp:content contentplaceholderid="PlaceHolderMain" runat="server">
    <div id="peoplePickerDiv"></div>
        <div>
            <br/>
            <input type="button" value="Get User Info" onclick="getUserInfo()"></input>
            <br/>
            <h1>User info:</h1>
            <p id="resolvedUsers"></p>
            <h1>User keys:</h1>
            <p id="userKeys"></p>
        </div>
    </asp:content>​​​​​​​​​
    Vishnu

  • Client side cacheing!

    Hi,
    We have a Java Web Start application, which caches around 500MB of heavy weight objects in memory. These corresponds to different reports and it kind of grows over the time. I am looking for some kind of architecture framework or some work around to maintain this cache at the client side. It is bit late to change the architecture and it is important to cache all the objects.
    Could somebody suggest your views on this?
    Thank You,
    Vikram

    Cross post:
    http://forum.java.sun.com/thread.jspa?threadID=649133
    http://forum.java.sun.com/thread.jspa?threadID=649134
    http://forum.java.sun.com/thread.jspa?threadID=649135
    http://forum.java.sun.com/thread.jspa?threadID=649136
    http://forum.java.sun.com/thread.jspa?threadID=649137
    http://forum.java.sun.com/thread.jspa?threadID=649138

  • Controlling the client-side cache

    At the current stage on my project I'm finding that I'm changing my mapping definitions fairly frequently (because the country side is just the wrong shade of egg-shell). Clearing the server side cache is fairly easy to do, provided you remember to do it, but my problem is on the client side.
    Right now, the tiles are returned with a one week time to live. So if I change the mapping definitions it might not propagate through to all the clients until up to a week later. What I'd like to do, at least for now, is turn off storing of map tiles on the client-side. The easiest way to do that would be to specify the cache-control header but I can't seem to find a configuration option for that.
    Has anyone setup MapViewer to use a different cache-control?

    Hi Mark,
    You can specify the cache control statements for the page itself.
    If this does not help, try to set expires header for the images. ex for Apache see mod_expires for a directory/location setting
    regards, michael

  • Client-Side Cache Question

    Let's say I have a FLV that "lives" on a server, and I serve
    it up through, say, Ruby. The Ruby script takes care of obtaining
    the FLV from the filesystem and renders it to the browser.
    Inside my client-side SWF, my code to connect to the Ruby
    application and get the FLV may look like this:
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    tvid.attachVideo(ns);
    ns.setBufferTime(2);
    statusID = setInterval(videoStatus, 200);
    ns.onStatus = function(info) {
    trace(info.code);
    if(info.code == "NetStream.Buffer.Full") {
    bufferClip._visible = false;
    ending = false;
    clearInterval( statusID );
    statusID = setInterval(videoStatus, 200);
    if(info.code == "NetStream.Buffer.Empty") {
    if ( !ending ) {
    bufferClip._visible = true;
    if(info.code == "NetStream.Play.Stop") {
    bufferClip._visible = false;
    //ending = true;
    if(info.code == "NetStream.Play.Start") {
    ending = false;
    if(info.code == "NetStream.Buffer.Flush") {
    ending = true;
    //Play it
    ns.play("
    http://localhost:3000/stream");
    ==============
    It seems to me that the "decision" of whether or not to cache
    is entirely dependent on the access method within the client-side
    SWF. So, if in this case, I'm using NetStream to stream the video,
    will it still be cached on the client end? Or do I -have- to use
    FMS to prevent client caching - and if so, why? How does FMS
    prevent the client from caching the data (isn't it up to the client
    to delete the data bits after they're viewed?)
    Thanks a bunch for the help.

    Let's say I have a FLV that "lives" on a server, and I serve
    it up through, say, Ruby. The Ruby script takes care of obtaining
    the FLV from the filesystem and renders it to the browser.
    Inside my client-side SWF, my code to connect to the Ruby
    application and get the FLV may look like this:
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    tvid.attachVideo(ns);
    ns.setBufferTime(2);
    statusID = setInterval(videoStatus, 200);
    ns.onStatus = function(info) {
    trace(info.code);
    if(info.code == "NetStream.Buffer.Full") {
    bufferClip._visible = false;
    ending = false;
    clearInterval( statusID );
    statusID = setInterval(videoStatus, 200);
    if(info.code == "NetStream.Buffer.Empty") {
    if ( !ending ) {
    bufferClip._visible = true;
    if(info.code == "NetStream.Play.Stop") {
    bufferClip._visible = false;
    //ending = true;
    if(info.code == "NetStream.Play.Start") {
    ending = false;
    if(info.code == "NetStream.Buffer.Flush") {
    ending = true;
    //Play it
    ns.play("
    http://localhost:3000/stream");
    ==============
    It seems to me that the "decision" of whether or not to cache
    is entirely dependent on the access method within the client-side
    SWF. So, if in this case, I'm using NetStream to stream the video,
    will it still be cached on the client end? Or do I -have- to use
    FMS to prevent client caching - and if so, why? How does FMS
    prevent the client from caching the data (isn't it up to the client
    to delete the data bits after they're viewed?)
    Thanks a bunch for the help.

  • Using Client Side Extensions (SWF) to call external Web Service

    Hi,
    I'm using .swf files to extend my CRMOD application, and one of my requirements is to be able to show information on a custom applet using the Client Side Extensions. This information is coming from an external system, so i'm trying to call this external web service using .swf.
    When i create my swf application and i run it locally, i can access the web service and receive the results into my browser, but when i do the same call from the custom web applet in CRMOD i don't get any results.
    Can someone tell me if this is possible? And if so, how to do it?
    Best Regards,
    NF

    Post Author: luke
    CA Forum: Data Integration
    Yes. I  have figured out the way to do it.
    Luke.

  • How do I force clients to cache files obtained from my servlets

    I have a servlet that creates files.
    I want to save my servlet from generating a file that a client already has, (ie get him to use caching).
    I only want it to create a new file if any data has changed since last making it.
    (I can easily generate a last modified date for the data within the file)
    I know I have to use
    myServletResponse.setContentType(java.lang.String type) but am unsure as to what exactly to put in the 'type' field.
    I have read
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
    but am none the wiser as to the specific String needed

    So I don't need to fill in any HTTP Responce headers,
    I can just override the getLastModified() method?Don't take my word for it (because I haven't done it). Read the API documentation to see what it says, or try it.
    How will the client beable to compare dates without a
    date for the original?If this means "What happens the first time a client asks for a document?" then the answer is that it doesn't attempt to compare any dates. If it means something else, then try asking it in different words because I don't understand it.

  • Options for supporting web toolkit applications

    The various changes which have occurred between 10 and 11g are very detrimental to any users developing or supporting applications built with the original web toolkit (not APEX).
    In 10g, you could download the database and companion CD and end up with a database and http server with mod_plsql running in no time flat.
    In 11g, the database install is just as easy, but the http server install requires "Oracle Fusion Middleware Web Tier" which weighs in at a scary 1Gb+ (for a webserver) and assumes you are wanting to run lots of instances across an "enterprise grid". Even finding the error logs for when it doesn't work is hard. I spent a happy 4 hours trying to install it (following the instructions) without success.
    So, you think, what are the alternatives.....
    1. You could use the EPG, but the majority of advice is that this isn't suitable for production deployments
    2. You could use the APEX listener, but that doesn't support some of the features: flexible parameters, basic auth, etc
    There are a number of things Oracle could do to rectify this
    1. Open source mod_plsql. If they are not going to develop it further then let someone else do it for them
    2. Maintain backwards compatibility with mod_plsql in the APEX listener - not every application is APEX
    Hopefully someone from the APEX listener team can say "yes, we'll be making the apex listener compatible with all mod_plsql features in the next release". Fingers crossed...
    This was expressed more eloquently by John Flack here
    http://it.toolbox.com/blogs/jjflash-oracle-journal/application-express-listener-an-open-letter-35464
    Edited by: user486189 on 07-Aug-2010 04:52

    Thanks for the favorable mention of my blog - I updated that entry with a later one based on the Release Candidate version of the Apex Listener. I haven't given the production version a really good try yet, but what I've seen is pretty close to what I saw in the early adopter versions, except that the documentation is much better - bravo.
    You've named two alternatives to mod_plsql. Here are a few more:
    mod_owa: This is similar to mod_plsql, but it works under the generic version of Apache web server, rather than Oracle's customized version, Oracle HTTP Server. It is configured a little differently from mod_plsql and has some variations in the way it supports some of the more advanced features of the PL/SQL Web Toolkit, like flexible parameters. Joe Lennon wrote a blog entry about mod_owa here: http://www.joelennon.ie/2008/12/09/install-apache-mod-owa/.
    The base website for mod_owa is: http://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm
    Thoth Gateway: If you have a Microsoft IIS web server, you might try the Thoth Gateway. Find it here: http://code.google.com/p/thoth-gateway/
    DBPrism: This is another JEE based application that I know that some are using. DBPrism was not primarily intended as a mod_plsql replacement, but does do that too. Find it at: http://www.dbprism.com.ar/en/index.html
    Please be aware, I haven't tried these (except a brief trial of an earlier version of mod_owa) so I can't vouch for them.

  • Windows 8.1 Client Side Caching - Is it possible to specify the location of the offline file cache?

    Hi,
    Is there any approved way to change the location of the offline files cache in Windows 8.1?  I'm asking before moving client systems from Windows 7 where a registry change was required - is this still the way to go?
    I believe that if the default user-profile directory is moved, this causes problems for updates to Windows 8/8.1 now, is the same true if you move CSC?
    Just a bit of background.  The systems I want to do this for have smallish SSD boot drives with a higher capacity spinning disk.  The machines are members of a domain with Folder Redirection setup.  I could setup group policies to disable
    caching of some of the larger directories or even disable CSC entirely on the machines which have an SSD boot drive, but would prefer not to do so.
    Thanks in advance.

    Hi,
    According to your descryption, In windows 7, the tool is migwiz.exe, namely the Windows Easy Transfer, you can modify the registry in the way listed in the post below:
    http://social.technet.microsoft.com/Forums/en-US/bbf5890c-b3d7-4b38-83d8-d9a5e025fb2b/how-to-move-clientside-caching-to-a-new-location?forum=w7itproinstall
    In Windows 8, Windows easy transfer is also a built in tool to migrate user profiles and user settings, but as for the offline transfer, I suggest to use the USMT for your situation.
    Because with USMT you can specify the folder that you want to migrate the files to, by using an offline.xml you can set the path just as the sample listed below:
    <offline>
         <winDir>
              <path>C:\Windows</path>
              <path>D:\Windows</path>
              <path>E:\</path>
         </winDir>
         <failOnMultipleWinDir>1</failOnMultipleWinDir>
    </offline>
    You can also refer t othe details at:
    http://technet.microsoft.com/en-us/library/hh824880.aspx
    Regards
    Wade Liu
    TechNet Community Support

Maybe you are looking for