Multiple Cache-Control Directives- iPlanet

Hi,
Quick question: I'm running iPlanet 4 and want to add 2 cache control directives to the same directory. I want to add a max-age of 1 and a must-revalidate directive. Is this possible? The behavior I was seeing is that only 1 directive was being sent along with the request/response to the client. The end result I want is that the client will check (almost) every request for a file and if it is new pull that file, if not allow the cache'd version to be used.
Thanks in advance,
Jason
obj.conf:
<Object ppath="/www/iplanet/site_docroots/plannet/p/*">
PathCheck fn="set-cache-control" control="max-age=1"
</Object>
<Object ppath="/www/iplanet/site_docroots/plannet/p/*">
PathCheck fn="set-cache-control" control="must-revalidate"
</Object>

PathCheck fn="set-cache-control" control="max-age=1,must-revalidate"

Similar Messages

  • Cache control directives in iPlanet 4.1 (SunOS 5.7)

    Using the admin gui (Content Mgmt->Cache Control Directives), I set the cache control to "No Cache" for the entire server; however, clients still seem to cache pages from the server (IE6 on winxp does not go to the server for pages it has seen before). I looked at the response headers using wget on solaris (as well as wfetch on winxp), and I don't see the Cache-Control header. Here is what I get back after requesting a page from the server:
    HTTP/1.1 200 OK
    Server: Netscape-Enterprise/4.1
    Date: Wed, 31 Dec 2003 14:01:13 GMT
    Content-type: text/html
    Content-length: 120
    Connection: keep-alive
    I restarted the server, and the admin gui shows the correct ("No Cache") setting for the server.
    Thanks in advance for any ideas on how to get the server to ask the client not to cache the pages.

    Can you show us your obj.conf file?
    Thanks
    Manish

  • Cache-control on IPlanet 6.0 SP5 doesn't work

    Hi.
    I am desperately trying to set cache-control max-age=0/no-cache to every file that is sent by the IPlanet from a special directory. I used the web console to set /dir/* to no-cache or max-age=0 but althoug the settings are applied and the server is restarted the HTTP header is still not touched in any way.
    I read to changes of SP6 and SP7 but couldn't find anything regarding this problem so I haven't upgraded yet.
    obj.conf says:
    <Object ppath="/var/apps/weblogic/myserver/public_html/mydir/*">
    PathCheck fn="set-cache-control" control="no-cache"
    </Object>
    This is placed directly after the default object.
    Any help is highly appreciated. Thanks a lot,
    Thomas

    There's a big difference between the set-cache-control SAF and the HttpServletResponse.addHeader API. set-cache-control understands the HTTP protocol version in use and, if that version supports Cache-control header fields, adds a Cache-control header. HttpServletResponse.addResponse blindly adds any header you specify.
    If you want to use HttpServletResponse.addHeader to add a Cache-control header to a response in Web Server, you can do so. The meaning of that header isn't defined by the HTTP/1.0 protocol, however.

  • Cache control directives for Weblogic 6.1

    Hello:
    I was wondering if anyone knew if one could configure Weblogic 6.1 to produce
    cache control headers (ie "Cache-control: max-age=1800")? I realize that I should
    probably be using a conventional HTTP server and the WLS plugin, but I'm just
    doing some research here. So any help would be appreciated.
    Thanks,
    Scott Resnik

    Can you show us your obj.conf file?
    Thanks
    Manish

  • How can we get iWS4 to use the cache control directive no-store on pages generated through a NSAPI filter?

     

    You shouldn't have to do anything at all, it should work right out of the box.
    First thing to do + questions.
    Open a new project, create an External MIDI track, set the track to record, start Logic recording, play a few notes with sustain pedal down/up a few times. Open Logic's LIST editor and look at the data being recorded. What are you showing for sustain pedal events? What numbers?
    That will give everyone here an idea of what's going on.
    Like I said.... I've never had to do anything.
    Also, this could possibly be a problem with "Control Surfaces" assigning a non compatible control surface.
    As a precaution delete the CS preference file.
    With Logic not running:
    Delete the control surfaces file.
    In the Finder, choose Go > Go to Folder from the menu.
    Type ~/Library/Preferences in the "Go to the folder" field. (be sure and use the ~ tilde in the path)
    Press the Go button.
    If you are having trouble with a control surface in Logic Pro.
    then delete the com.apple.logic.pro.cs file from the preferences folder.
    The file is rebuilt next time you boot Logic.

  • Cache-Control in OC4J

    We had very typical problem in our web application.
    We are using Oracle AppServer 10.1.2. on Sun Solaris with Web-Cache Enabled.
    When we are trying to access the pages the response object contains multiple Cache-Control headers, though we have not explicitly added through our code. Can any one tell me how to delete the response headers through code or at server settings. I have tried with "reset()" but of no use.
    Because of this cache problem we are not able to generate the reports but the same it working with Firefox browser.
    Thanks in advance.
    Kishore

    It's unfortunate that JSPs running in WebLogic can't override the default Cache-Control directives in Web Server. That's probably a bug in the WebLogic plugin. (It is possible for JSPs running directly on Web Server to override the default Cache-Control directives.)
    As with any obj.conf directive, you can configure Cache-Control directives on a path-by-path basis. For example, the following would set Cache-Control: no-cache for /foo/*.jsp and Cache-Control: private for all other URIs:<Object ppath="/foo/*.jsp">
    PathCheck fn="set-cache-control" control="no-cache"
    </Object>
    <Object name="default">
    PathCheck fn="set-cache-control" control="private"
    </Object>Information on obj.conf syntax, including how to configure separate objects for separate paths, can be found in the Syntax and use of obj.conf chapter of the NSAPI Programmer's Guide at http://docs.sun.com/source/817-6252/npgobjcn.html.
    I'm not sure what you mean by "what are the services handled by the web server and the the app-server and how they interact with each other". However, it's worth noting that Sun ONE Web Server 6.1 is fully capable of running JSPs by itself; there's no need for a separate WebLogic server.

  • Selective Cache-control in the web server

    I am using weblogic 8.1 as the app server and Sun one 6.1 as the web server
    In my obj.conf of the web server we have this
    PathCheck fn="set-cache-control" control="private"
    This caches all the pages.
    But I don't want some pages to be cached in our site.
    For this, I tried setting "no-cache" for the "Cache-control " of the response hedear, in corresponding jsps. But the webserver configuration is overriding this.
    This configuration set in the webserver should be applicable for all the modules except for some urls .
    can anybody tell me how to make this selective cache-control configuration in the obj.conf of sun one web server.
    or if there is any way to prevent the set up in jsp from being overridden this webserver ?
    Also it would be great if anybody can explain, what are the services handled by the web server and the the app-server and how they interact with each other....

    It's unfortunate that JSPs running in WebLogic can't override the default Cache-Control directives in Web Server. That's probably a bug in the WebLogic plugin. (It is possible for JSPs running directly on Web Server to override the default Cache-Control directives.)
    As with any obj.conf directive, you can configure Cache-Control directives on a path-by-path basis. For example, the following would set Cache-Control: no-cache for /foo/*.jsp and Cache-Control: private for all other URIs:<Object ppath="/foo/*.jsp">
    PathCheck fn="set-cache-control" control="no-cache"
    </Object>
    <Object name="default">
    PathCheck fn="set-cache-control" control="private"
    </Object>Information on obj.conf syntax, including how to configure separate objects for separate paths, can be found in the Syntax and use of obj.conf chapter of the NSAPI Programmer's Guide at http://docs.sun.com/source/817-6252/npgobjcn.html.
    I'm not sure what you mean by "what are the services handled by the web server and the the app-server and how they interact with each other". However, it's worth noting that Sun ONE Web Server 6.1 is fully capable of running JSPs by itself; there's no need for a separate WebLogic server.

  • Cache control in wml

    hi,
    I am getting problem in cache controlling in wml page for example a image displayed on the page is not displaying again but i am getting same in the console..help me out....

    It's unfortunate that JSPs running in WebLogic can't override the default Cache-Control directives in Web Server. That's probably a bug in the WebLogic plugin. (It is possible for JSPs running directly on Web Server to override the default Cache-Control directives.)
    As with any obj.conf directive, you can configure Cache-Control directives on a path-by-path basis. For example, the following would set Cache-Control: no-cache for /foo/*.jsp and Cache-Control: private for all other URIs:<Object ppath="/foo/*.jsp">
    PathCheck fn="set-cache-control" control="no-cache"
    </Object>
    <Object name="default">
    PathCheck fn="set-cache-control" control="private"
    </Object>Information on obj.conf syntax, including how to configure separate objects for separate paths, can be found in the Syntax and use of obj.conf chapter of the NSAPI Programmer's Guide at http://docs.sun.com/source/817-6252/npgobjcn.html.
    I'm not sure what you mean by "what are the services handled by the web server and the the app-server and how they interact with each other". However, it's worth noting that Sun ONE Web Server 6.1 is fully capable of running JSPs by itself; there's no need for a separate WebLogic server.

  • CE HTTP 1.1 and Cache Control

    Hi all,
    I have two questions concerning CE and HTTP 1.1:
    1) Does anyone know what happens on a Content Engine if a web server uses the HTTP 1.1 Cache-Control directive with the value PUBLIC?
    How long does the object remain in cache?
    2) What happens if I set http max-ttl in global configuration? Does this overwrite the Cache-Control directive?
    Thanks in advance
    Fausto

    I have noticed that when the cache-control directive set to no-cache="set-cookie", the Cache Engine receives incoming HTTP 1.1 Requests, but there is no hit in the cache. Wondering why the Content Engine fails to cache this? I haven't tried the value public.

  • JRE Cache ignores the "Expire" and "Cache-Control: no-cache" directives.

    My applet is using HttpURLConection to retrieve data from a server with Caching enabled. The cache contents are "revalidated" (via "if-modfied-since") each time the applet is started. However, subsequent requests to retrieve the same resource are always read from the cache with no validation even if the resource has expired.
    The server is sending a valid "Expires:" tag and "Cache-Control: no-cache" tag in the response; but, the JRE refuses to recheck for an updated version of the resource even after the file has expired.
    The JRE does seem to understand the "Cache-Control: no-store" tag; but, this is inefficient (no caching at all) when I'm tring to get it to not refetch the resource unless there's a change. Is there some other tag that the JRE is expecting to see?

    I have a similar problem except that I want my pages to not cache at all. The server is setting the Cache-Control: max-age to 0 and the Expires to "now" but JRE seems to ignore these settings, but only sometimes. Sometimes pages are fetched from cache and sometimes from the server.
    In my applet I'm using a normal URLConnection like this:
    URLConnection uc = new URL("http://<server>/method").openConnection();
    uc.connect();
    InputStream is = uc.getInputStream();
    is.read();When my request headers look like this:
    accept-encoding: gzip
    Host: <server>
    Cache-Control: no-cache
    Pragma: no-cache
    User-Agent: Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_13
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-alivethe page will not be cached and is requested again but this time without the accept-encoding, Pragma and Cache-Control. The adding (and removal) of the headers seems to happen inside the JRE, though. I'm not explicitly setting them.
    The response header of the first request looks like this:
    HTTP/1.1 200 OK
    Date: Wed, 20 May 2009 12:55:07 GMT
    Server: Apache/2.2.11 (Win32) mod_jk/1.2.26 PHP/5.2.8
    Cache-Control: max-age=0
    Expires: Wed, 20 May 2009 12:55:07 GMT
    Vary: User-Agent,Accept-Encoding
    Content-Encoding: gzip
    Keep-Alive: timeout=120, max=79
    Connection: Keep-Alive
    Transfer-Encoding: chunked
    Content-Type: text/html;charset=iso-8859-1When the request is made with this header:
    User-Agent: Mozilla/4.0 (Windows XP 5.1) Java/1.6.0_13
    Host: <server>
    Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Connection: keep-aliveThe response headers looks like this:
    HTTP/1.1 200 OK
    Date: Wed, 20 May 2009 12:55:07 GMT
    Server: Apache/2.2.11 (Win32) mod_jk/1.2.26 PHP/5.2.8
    Content-Length: 1016
    Cache-Control: max-age=0
    Expires: Wed, 20 May 2009 12:55:07 GMT
    Vary: User-Agent,Accept-Encoding
    Keep-Alive: timeout=120, max=83
    Connection: Keep-Alive
    Content-Type: text/html;charset=iso-8859-1And in this case the JRE sometimes fetches the request from the server and sometimes from cache. I have not been able to determine how the JRE decides to refresh, or why it sometimes sends an accept-encoding and Pragma header and sometimes not.
    any help would be appreciated.
    Alex

  • Reader X doesn't display Pdf stream if response contains header "Cache-Control: no-store, no-cache"

    Hi all,
    I work on a web application that, among others, generates Pdf documents. It renders them directly within the IE window by "streaming" the content of the Pdf in the response output stream. Note that we also add the header "Cache-Control", "no-store, no-cache, must-revalidate,post-check=0, pre-check=0" to the response.
    Everything was fine with previous version of reader but since I installed Adobe reader X the content of the Pdf is not showing any more in my browser.
    Here is what I already investigated:
    - if I use another machine with an "older" Reader version, it works. If I save the displayed Pdf and try to open it on the machine where X is installed  it works
    - if I remove the the Cache-Control header, then it works with reader X installation
    Do you have any idea what changed between version 9 and X that could lead to this issue ?
    To ease diagnostic I created a sandbox environment to reproduce the problem, you can go to the following address to see what's happening (or not in case you have version X installed)
    With the Cache-Control header: http://readerxissue.appspot.com
    Without the Cache-Control header: http://readerxissue.appspot.com/enableCache.html
    I must confess that I am a bit stuck and I wonder if some of you could help.
    Thanks a lot
    Regards
    Vincent

    Hello,
    We have semiliar problems in sweden with Adobe Reader X 10.1 Swe and Internet Explorer 8.0 with streamed PDF files.
    We had some issues and got them resolved by the following
    Upgraded to Adobe Reader 10.1.2.45 Eng
    - Print Issue:http://helpx.adobe.com/acrobat/kb/pdf-wont-print-reader-10.html
    - Grey box in Internet explorer: http://helpx.adobe.com/acrobat/kb/pdf-opens-grey-screen-browser.html
    - Add site as trusted: Edit-> Preferences, unbox Enable Enhanced Security + add the host/url to site that is whitelisted to send pdf files
    (the Automaticly trust sites from mu Win OS security zones doesnt work for us)
    The thing is we run MUI pack on our Citrix servers and want Adobe Reader in Swe but it havent been translated yet...
    So we have to wait for the swedish release on Adobe Reader X 10.1.2
    Thanks,
    Tony Van Der Haagen
    IT-Mästaren
    Sweden

  • Controlling Cache-Control headers

    We have an application written in BC4J 9.0.3.4 riding atop 9iAS 9.0.3.1.0.
    The release notes for this version of 9iAS say
    2484551 Microsoft Internet Explorer cannot open some file directories due to HTTP NO-STORE header
    If users use Microsoft Internet Explorer 6.0.2600.0000, then they cannot open some attachments, such as Microsoft PowerPoint or voicemail directly. They have to save the file and open it from their file system. The file cannot be opened because Microsoft Internet Explorer 6.0 doesn't save the file to the <code>temp</code> folder when an HTTP no-store header is set.
    Saying that this is fixed is, to say the least, iffy. A packet dump clearly shows the following headers being set at some point after JSP filters get a chance to kick in (i.e., probably by mod_oc4j itself):
    Pragma: no-cache
    Cache-Control: no-store
    Surrogate-Control: no-store
    Cache-Control: private
    There doesn't seem to be any way of turning these headers off other than using .htaccess and mod_headers to explicitly delete them (which is definitely not ideal). Further, my tests indicate that these headers (probably only Cache-Control: no-store) prevent IE5.5 and IE6 both from launching external applications on the basis of Content-Type / extension, and from saving the page at all.
    This is, admittedly, a violation of RFC2616 on IE's part: that RFC states that no-store is meant to apply to intermediate proxies, not to user agents themselves. But nonetheless I think Oracle should at least allow pandering to this particular bug; i.e., even if Cache-Control: no-store is on by default, it should be possible to turn it off.
    Am I missing something? Is there any way to stop mod_oc4j adding these headers?

    I tried the brute-force approach:
    Header set Cache-Control: no-cache
    Header set Surrogate-Control: no-cache
    in .htaccess.
    Alas, .htaccess isn't being read, even with
    <Directory /oracle/product/ias_903/j2ee/OC4J_DEV/applications>
    AllowOverride FileInfo
    </Directory>
    in the httpd.conf.
    This is confusing. Does mod_oc4j somehow ban the processing of .htaccess files even if the AllowOverride says otherwise?

  • Cache-Control problem

    I don't really know if this is a Tomcat problem or a jsp problem... I have some java server pages with form components and when I hit the back button in a browser, the contents of a form disappear. I checked the response header with a perl script and it seems that there's always Cache-Control: no-cache and Pragma: No-cache in the header. I didn't put them there. I've tried to put some lines as
    response.setHeader("Cache-Control","max-age=3600");
    response.setHeader("Pragma","max-age=3600");
    response.addHeader("Cache-Control","max-age=3600");
    response.addHeader("Pragma","max-age=3600");
    into my jsp, but they have no effect. I've tried disabling all filters, no effect. I've done a full text search on the whole tomcat directory tree with keywords like no-cache, cache-control and those words don't appear anywhere (but in my jsp). I suspected that apache could mess things up, but browsing the jsp's directly from tomcat (through port 8080) does the same.
    Running out of ideas... Do you have any?
    -Marko

    It's neither. It's a browser problem... and perhaps your assumption that the browser has to remember what was in the form fields when you go back. Cache control has to do with caching the page, not form input anyway. I've never seen any header settings which tell instruct a browser what to do with form data after the form is submitted.
    You could provide a back button on the form and have the JSP fill in the default values based on what's stored in the session, if you are storing it in the session. But if it's not a multipage form, there usually is no reason to be "going back" anyway, because the form is submitted and whatever's done with that data should be done by that point.
    Tomcat could be defining default headers for anything in some config file.

  • Wiki cache-control

    I'm becoming confused by the settings for caching wiki pages and their elements.
    Using the develop menu and Network Timeline window in safari I can follow the downloading of images, css, js files etc.
    I recognise that the wiki page itself is set not to cache for obvious reasons of maintaining up-to-date copies of a page, but the other elements seem to sometimes be cached by my browser and at other times (i.e. currently) resolutely not cached.
    The network timeline (currently) says that all the others files have their cache-control set to max-age = 0. Hence it is not surprising that my browser repeatedly downloads the files.
    O.K. So the question is;
    What sets this value? Presumably the wiki server ( although possibly my browser), but on what basis, how and can it be changed?
    When I first started looking at this issue, a few weeks ago, I managed to arrive at a situation where almost all 'elements' were being successfully cached and page downloads were under 2 seconds. Currently It's up to over 6 seconds. I don't know if, or how, I've changed anything.
    Can anyone offer any guidance or direction as to where I can find out more about how these settings are achieved?
    Ta.

    I realise that it is the weekend but although this post has prompted a reasonable number of views no responses, so I will offer a little more information about the situation in the hope of eliciting some advice...
    I have edited the httpd_teams.config file to include the line
    Header set Cache-Control "max-age=600001, private, must-revalidate"
    and restarted Apache.
    I then clear the cache in Safari, quit and restart.
    On re-entering the URL of the wiki it loads a page in approximately 7 seconds. On inspecting the request and response header of one of the .css files, for example, the request makes no reference to cache-control but the response, correctly, contains the cache-control statement as set above.
    However, when I navigate to another locaction and then return to the page the .css request contains max-age=0, ( with the response still correctly set).
    WHY?
    Just to make matters 'worse', some other files, particularly .png files for some reason, correctly retain the set max-age and use the cache as I intended.
    Clearly, I am missing something. Does anyone have the slightest idea what or how to go about working it out?

  • Multiple set-cookies directives

    Hi All- I'm testing against an http server that sends multiple set-cookies directives (there are 4 cookies total). As far as I can tell, it is legit HTTP to either send a single set-cookie directive with multiple cookies in it, or multiple set-cookies directives. I am getting erratic behavior. Using the wtk emulator, i am able to receive and process multiple set-cookies directives. Using some phones it works, on others it doesn't. I am trying to create a unit test for my code, and I am unable to figure out how to set up the classpath the same way the emulator does to work with multiple set-cookies directives.
    I searched the jars in the wtk22 directory, and it appears that wtklib/emptyapi.zip, wtklib/gcf-op.jar, lib/midpapi10.jar and lib/midpapi20.jar all contain the HttpConnection class. I am guessing that the emulator is picking up a different implementation than my unit test or the phones that don't work? Has anyone encountered and solved this problem before? Is there a way at runtime to determine from which jar a class was loaded?
    thanks,
    Bleu

    I have a very similar authentication flow in my app.  Using native calls (HttpClient) I am able to retrieve the authentication token, and can easily set a cookie with that token, and use the cookie with subsequent
    native calls via HttpClient.
    I believe that what you are asking for is the ability to add that cookie (with the token you got natively) into the webbrowser control's cookie store
    BEFORE trying to load your dashboard page.  You want your webbrowser control's request for the dashboard page to provide the cookie so that the user doesn't have to log
    in again, and only one webbrowser request is made.  Is this correct? 
    Sadly, I do not think this is possible.  The other answers describe how to add a cookie to a webbrowser control's page after that page has been loaded.  This is adding the cookie to the "document" within the browser control, not
    into the webbrowser control's store.  These approaches will not allow you to add the cookie into the webbrowser control's store, ahead of time, so that it will be sent when you first request the page. 
    If I am correct about what you are asking for (I want this too!) it is not supported on Windows Phone as you cannot write directly to the webbrowser control's cookie store.  You can read it, but not write to it.  It's sad as this particular
    authentication flow is very common, and easy to achieve on both iOS and Android... just not on Windows Phone.
    To get around this in my app, I perform my native authentication (HttpClient) and then authenticate
    again within the webbrowser control itself.  Basically, load the login page into the browser, then submit the login form via eval of JavaScript, and when that finishes loading (valid
    response), load the actual target page.  This is a fragile and inefficient hack, but it seems to work. 
    Hope this helps...

Maybe you are looking for