Safari seems not sending If-Modified-Since header for main address

Not sure I'm in the appropriate forum but let's try (if there is more appropriate one please advise).
When Safari requests a resource (page, image...) to a web server it doesn't provide If-Modified-Since header for the main resource of the request. That means the web server can't answer "resource not modified, use your cache". This is not the behavior of other browsers and not good in terms of performance for the web server as well as for the user.
However Safari sends this If-Modified-Since for the sub-elements of the resource (e.g. images, css in a page...). Which is good.
Is there a way to influence Safari's behavior to provide a If-Modified-Since for the main resource requested to the server?
acama,

Found out the answer.  IIS 6 does in fact steal "If-Modified-Since" and "If-None-Match" headers, but only on custom 404 redirects.  That's actually what I'm doing here (that'll teach me not to put details in a question when I think they're irrelevant -- actually I just forgot).
Here's two discussions on the issue (they're using ASP, but apparently it's the same for ColdFusion):
http://www.eggheadcafe.com/conversation.aspx?messageid=32839787&threadid=32839787
http://www.webmasterworld.com/microsoft_asp_net/3935439.htm

Similar Messages

  • ??? Using JSPs to Send Not-Modified-Since Header ???

    Hi all,
    In looking at past posts, I'm afraid I know the horrible answer
    to this issue but I thought I'd ask just in case I missed
    anything.
    Let me start by saying I'm using Tomcat v4.0.4 beta 3.
    As you know, when a client (usually a web browser) has a cached
    version of a resource (usually a web page) it can send an
    "If-Modified-Since" header to the HTTP server. The server
    compares the time/date stamp specified in the header with that of
    the requested resource. If the resource has not been modified
    since the time specified in the "If-Modified-Since" header, the
    server sends back a 304 (Not-Modified) response, effectively
    telling the client (usually a web browser) that its cached
    version of the resource is still valid.
    When writing a servlet, it's easy to handle this sort of
    scenario. The javax.servlet.http.HttpServlet class has a
    "service()" method. This method first checks if the incoming HTTP
    method is a GET. If it is, the "service()" method proceeds to
    call the "getLastModified()" method of the servlet. As a
    developer, you can override "getLastModified()" to return a long
    value representing the last time the requested resource was
    changed. Depending on the value returned by "getLastModified()"
    (note that -1 is returned if you don't override the method) the
    "service()" method may simply return a 304, Not-Modified response
    rather than calling the servlet's "doGet()" method.
    Now, the $18.32 Question: How do you ensure "getLastModified()"
    is called in JSP?
    No, you cannot simply do this:
    <%!
       public long getLastModified() {
          return xxx;
    %>The problem is that the above method will never be called by the
    container.
    I traced through some of the Tomcat/Catalina/Jasper code and it
    seems to me that the response code is being set to 200/OK very
    early on in the processing.
    I also took a cursory look at the JSP spec and didn't find any
    indication of setting a "Not-Modified" response code...so, I am
    thinking this is something that is (strangely) missing in the JSP
    specification. I have a JSP page that needs to update itself once
    per day. Therefore, it would be very handy to have the
    "getLastModified()" functionality enjoyed by servlet writers.
    Can anyone confirm this?
    Thanks...

    I've not come across this before, but like you I cannot find any mention of how to handle modification dates in the JSP spec. I can think of a couple of possible ways round this:
    1. Try to delegate the functionality to a servlet. You'd need to pass the JSPs modification date and handle the return. Seems messy and I haven't tried it.
    2. Add code to the JSP to read the headers directly and set the appropriate status code. e.g. at start of JSP:
    <%@page  import="java.util.*" %>
    <%
    if (request.getMethod().equals("GET")) {
       GregorianCalendar lastModified = new GregorianCalendar(2002, 01, 01); // use constant for testing
       response.setDateHeader("Last-Modified", lastModified.getTimeInMillis());  //always set header
       long modifiedSince = -1;
       try {
          modifiedSince = request.getDateHeader("If-Modified-Since");
       } catch (IllegalArgumentException iae) {
            // System.out.println(iae);
       if (modifiedSince != -1 && modifiedSince > lastModified.getTimeInMillis()) {     
          response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
          return;
    %>This would probably best be implemented as a custom tag if needed in more than one page.

  • If-modified-since header?

    Google tells me I need to be hosted on a server that supports this header (and it makes sense from a Google perspective). My host tells me that his servers do support that header. Yet when I test my pages on his server, the tool I am using tells me no support. Can anyone here help me with this?

    OK - for this to work, you need to insert a preamble on each PHP page -
    <?php
    $tsstring = gmdate('D, d M Y H:i:s ', $timestamp) . 'GMT';
    $etag = $language . $timestamp;
    $if_modified_since = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] : false;
    $if_none_match = isset($_SERVER['HTTP_IF_NONE_MATCH']) ? $_SERVER['HTTP_IF_NONE_MATCH'] : false;
    if ((($if_none_match && $if_none_match == $etag) || (!$if_none_match)) &&
    ($if_modified_since && $if_modified_since == $tsstring))
    header('HTTP/1.1 304 Not Modified');
    exit();
    else
    header("Last-Modified: $tsstring");
    ?>
    This is from the discussion here -
    http://stackoverflow.com/questions/1971721/how-to-use-http-cache-headers-with-php
    which I had seen once, but it was not clear to me that this was to be used on the pages involved, and thought it might be a way to check the if-modified-since header from a PHP page instead of a way to make the page send the header.

  • Hi: my mac air safari is not loading all websites since i upgraded my software.. it download only few website and crome in the mac is not responding at all.. what to do please advise ???

    Hi: my mac air safari is not loading all websites since i upgraded my software.. it download only few website and crome in the mac is not responding at all.. what to do please advise ???

    Safari Problems
    Safari - Unsupported third-party add-ons may cause Safari to unexpectedly quit or have performance issues
    Try setting up another admin user account to see if the same problem continues. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up after waiting 10 seconds. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About

  • Safari does not send passwords to server.

    I am using Chrome to post this because I can't log in with Safari as it will not send my password properly. This happens on all sites requiring password login. Firefox and Chrome work fine. Sarfi works OK on different user account on the same iMac running Lion so problem is confined to my home configuration.
    I have tried:
         Fixing permissions
         Rebuild directory with DiskWarrior
         Run Cocktail routines
         Delete com.apple.safari files from Preferences folder in my user library.
         Reset Safari and deleted Safari caches.
         Installed new Safari 6.0 with software update.
    I also notice that I cannot clear my purchase cart at the Apple store. It seems that maybe the handling of https is corrupted.
    I have clone backup of entire system but it also has the same problem. I have TimeMachine backup but don't know which file should be restored to correct this problem.
    I would like to clear this up before upgrading to 10.8
    Any help would be appreciated.
    NoelDean34

    From your Safari menu bar top of your screen click Safari > Preferences then select the Autofill tab. Make sure User names and passwords is selected.
    Since passwords are stored in Keychain Access, try repairing.
    Open Keychain Access located in HD > Applications > Utilities
    From the Keychain Access menu bar click Keychain Access > Keychain First Aid
    Enter your admin password then click Verify. If necessary, click Repair.
    Run Cocktail routines
    Third party cleaning utilties are not necessary on a Mac and often cause more harm than good. Better to uninstall Cocktail before upgrading to Mountain Lion.
    Uninstall Cocktail >  http://www.perfectuninstaller.com/Home-and-Education/Cocktail%201.html
    Make sure your Mac qualifies before purchasing Mountain Lion >  Upgrade your Mac to OS X Mountain Lion.

  • Safari showing not connected to internet since update

    Hi all,
    Just wondering if anyone is experiencing a similar problem or has a remedy? Basically both my imac and macpro were recently updated with both OS & Safari updates. Since doing so you will often click on a link to a new page and a message will come up saying that Safari could not open the page because we're not connected to the internet. We are as you can automatically go back to the previous page or load other websites. If you click the link about 3 times it eventually opens, but naturally it's very frustrating.
    Any suggestions on what could be the cause? Any help is much appreciated.
    Thanks!

    HI and welcome...
    From your Safari menu bar click Safari / Preferences then select the Security tab.
    Click: Show Cookies.
    Delete all cookies.
    Shut down your Mac, restart, then launch Safari.
    Carolyn

  • Safari will not display pdf files since installing OS 10.8.2

    Safari will not display pdf files uner Lion 10.8.2

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • JCAPS 5.12 - modifying SOAP header for webservice Invocation

    I am trying to call an external web service from JCAPS 5.1.2 and need to set a token in the SOAP header. I am able to do this in other client implementations, however, the methods to modify the header don't seem to be exposed within JCAPS 5.1.2 or I do not know how to find the methods.
    Has anyone tried this before?

    Hi Experts,
    I'm trying to protect a web service deployed in jcaps 5.1.1, using SAML assertions against an Access Manager 7/7.1, the web services clients are both, web and standalone applications, I also have read netbeans tutorials, that expose how to implement identity webservices using AppServer 9.1 + AccessManager 7.1 using the SAML Holder of key and other security mechanisms, but this implementation requiere modifications to the server.policy file to add support to SOAP message security providers and HttpServlet message security providers, the addition of a library called amwebservicesprovider.jar to the classpath suffix (this library implements the jsr-196 java Authentication Service Provider Interface for Containers) and aditional configuration required in the AM side that is not detailed in the tutorials.
    Could someone guide me on how to protect the acces to a web services deployed in the jcaps logicalhost based on AM roles assigned to users?
    Any help is aprecciated
    Juan

  • Ipad not sending email, forced to reboot for changes to apply

    Hi all
    I was asked to look at a friends two week old iPad today.
    It was set up for them last week.
    Initially the person setting it up tried to add a Gmail account but found that it would receive but not send emails (using the native email app).
    They then decided to open an outlook.com account and use that instead of the gmail account.
    This worked fine for two days but then error messages saying that the mail could not be sent started to pop up. It struck me that the speed with which the error message appeared after clicking send suggested that this was an iOS issue rather than the server rejecting anything.
    I tried to check the imap/smtp settings in the "control panel" but they were not available (read:visible) so I deleted the account and entered the settings manually.
    It still wouldn't send emails but this time it didn't throw up any error messages, instead it decided to just dump them in the outbox without notifying me that there was an issue.
    Suspecting that the issue was with the ipad rather than the outlook servers, I decided to use my own smtp server details. Initially I tried using SSL but when this too failed I switched to the unsecure version on port 25.
    It still wouldn't send anything so I eventually rebooted by holding down the power button until the power off slider appeared. On rebooting I discovered that I could now send emails.
    TBH I have no idea if using the different SMTP server will be an issue if they ever want to check their outlook.com "sent mail" on line or not but i do have some questions
    1. Why was the reboot necessary? I had closed all open, unnecessary apps by double tapping the home button Might it have been the case that manually entering the outlook.com settings would have worked (given that the ideal set up would be to use the SSL outlook servers).
    2. Is this an unresolved iOS7 problem. Google searches resulted in many owners complaining that the iOS7 upgrade had rendered their email accounts incapable of sending emails. TBH the advice given ranged from perhaps sensible to plain daft.
    3. can anyone using outlook.com as their email provider on iOS7 confirm which smtp server, port, etc they use?
    4. Are there better email apps that actually give you detailed feedback?
    i don't know when I will next get the chance to get my hands on their ipad again but I would rather that they were using the correct outgoing servers with encryption (rather than my unencrypted smtp server).
    Thanks in advance

    neilyoung1 wrote:
    For the past few days I am now having trouble sending my client emails.  I get them bounced back with a permanent error of retry time exceeded.
    This is getting fustrating now as my client is needing answers that I cant give.  She is unable to email her colleague in the USA, and I am now unable to email her on a btinternet.com address.
    Do BT engineers monitor these forums?
    -Neil
    Hi again Neil.
    Your extra info now to me means that it appears to be problem at the client end!
    I hope you don't mind me asking a few questions ....
    Is she a regular BT Broadband user with a normal BTinternet email address ? Does she use secondary email addresses ?
    Do you know if she can happily email other people ? If not - it could be an account problem which may last a few days ....
    If you don't wish to provide the complete bounce message you received, could you perhaps email me the detail (emailing me using my shortcuts). Also pehaps you could ask your client to email me via my shortcuts, and see what happens and I'll take a look at replying to see what happens.
    The user on shentel.net domain she's been trying to email, did she ever manage to send any emails initially ? It could be the destination user having a problem.
    The mods do monitor these forums, but there are a lot of posts to go through of course ......
    http://www.andyweb.co.uk/shortcuts
    http://www.andyweb.co.uk/pictures

  • Do we not send Purchase order acknowledgement IDoc for order cancellation?

    Hi all,
    Is there a way to NOT send a Purchase order acknowledgement IDoc (POA) when we process an IDoc to cancel the order (or cancel all items)? The system now sends POA whenever there is a order create or order change (including cancellation) IDoc coming in but my customer wants not to receive POA in case of order cancellation.
    Thanks,
    Charles.

    Hi,
    Please give me your opinion and if we do not send the order response in case of order cancellation then please tell me how should I configure for that.
    Thanks,
    Charles.

  • EDI message is not sending to the third party for one particular SA

    DearAll,
                   We have the scenario to send the schedule lines to the third party system. for one particular schedule agreement schedule lines not sending to the third party system.
    while processing the messgae it is giving the error as "Message XEDI already processed on 20110317 070042"
    What could be the reason?.. we have checked all the EDI settings maintained for this supplier. some two weeks back there is no problem now only getting this message.
    how to resolve this?..
    Thanks in Advance
    Ananth.

    Hi Hareesh,
    Thanks a lot for the help. I have tried with removing the xml namespace, still the same result. I believe, the problem is with MTs tag in response message structure, bank xml data is trying to map with the response structure in PI, but when its finding the MTs tag I believe then its not mapping, and directly its passing the response in SXMB_MONI without any mapping.
    My question is how can I define my response structure without the MTs tagm, I mean same as what I am receiving from bank.
    Also I tried with without any mapping in response structure, I mean I used only one Message type for "response from bank" to "response to ECC" , without xml namespace, in this case I am able to receive the response in ECC, but there is exception called "PARSE_APPLICATION_DATA Error during XML => ABAP
    conversion: Response Message; CX_ST_MATCH_ELEMENT in " while receiving response, and when I go and see the logs, it says "System expected element 'MT_Response_MT940_Test'" , as its try to match with the defined structure in PI.
    Please experts help me, so my question is how can I avoid the MTs tag in my response structure, I just want to define my response structure in PI same as bank is sending me the data in xml tag, without any MTs tag.
    Thanks,
    Farhan

  • Safari is not sending proxy-authorization header for some https requests

    Hi,
    I have the problem that sometimes Safari doesnt send the necessary Proxy-Authorization header to our proxy for HTTPS requests.
    The proxy settings are configured in system preferences with a username and password.
    I did packet capture and I can see that most of the time it will work just fine and the trace looks something like this:
    CONNECT communicator.strato.de:443 HTTP/1.0
    Host: communicator.strato.de
    User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de-de) AppleWebKit/523.12.1 (KHTML, like Gecko) Version/3.0.4 Safari/523.12.2
    Proxy-Authorization: Basic XXXXXXXXXXXXXXXXX== (edited)
    HTTP/1.0 200 Connection established
    While some times it will look something like this :
    CONNECT communicator.strato.de:443 HTTP/1.0
    Host: communicator.strato.de
    User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; de-de) AppleWebKit/523.12.1 (KHTML, like Gecko) Version/3.0.4 Safari/523.12.2
    HTTP/1.0 407 Proxy Authentication Required
    Any idea why Safari sometimes wouldn't send the credentials to the proxy?
    Simon Putz
    Ironport Systems Customer Support

    Hi, I am also facing same problem
    Software : Weblogic jdk1.3.1
    If anyone know the solution ,Please help me
    Thanks,
    Suneel

  • Help, safari will not start at all since update to newest version

    Help, I am an admitted computer idiot- I always have had Macs because they are intuitive. My software updated automatically this week to the newest version of Safari, and now I cannot open Safari at all, I cannot even get to the Safari menu. I am using Firefox to type this - and I would rather use Safari as I am used to it. When I click on Safari the icon bounces up and down, then an error message appears saying that Safari quit unexpectedly, and do I want to send a message to Apple. I have clicked that message tab about 1000 times, no response.
    Can someone help me fix this- using very simple instructions, thank you

    We need to see a crash report, so restart Safari and when it crashes, copy the entire crash log and paste it into a reply window here. Notifying Apple is fine, but they will not respond, so you shouldn't expect that.
    Mulder

  • How can I customise Thunderbird message columns to show sender raw address (not display name) and the "Received for" email address that was used to reach me?

    I find it increasingly important to be able to see a sender's actual email address rather than just display name, as they usually don't show a company name - which a domain always would. Is there a way to customise settings/write a script/tweak files to add raw email & domain name columns? When dealing with a number of people at the same company it is hard to order or glance through a list of emails to find them. I also know 2 people with the same name at different companies and it is impossible to distinguish!
    Secondly, as a related column addition, since a number of email aliases reach me it would be useful to have a column to show the "Received..for" part of the message source which reveals the actual email used in the To/CC/BCC which led to me. Again can this be tweaked or scripted?
    I have programming experience but have not made add-ons and would be open to a suggestion which involves creating a custom add-on if adding columns with custom values is possible that way.
    Best Regards,
    Drew

    Extended message headers can be searched from Edit/Find/Search Messages, or the folder context menu, by adding custom headers to the search criteria. So, you might be able to create a search on specific properties of a message.
    The method of adding custom headers to searches is the same as the one described here for filters:
    http://kb.mozillazine.org/Filters_(Thunderbird)#Custom_headers

  • Modifying outbound header for basic authentication

    Hi,
    I want to add the username password that is required by the third party, but I dont want to use service account, instead I want to do it in message flow of proxy service by modifying some variable in the variable structure but I am not sure which variable am i suppose to change.
    Please help me out with possible solutions.
    Rgds,
    rahul.

    Hi Atheek,
    I added a transport header while routing to the business service and getting the following error <BEA-386012> <An error ocurred while evaluating the message-level username XPath selector: [OSB Security:386014]the result of the XPath selector is empty>
    I selected the Other option and value as Authorization, in the Action tab I have written xs:base64Binary('testuser:welcome')
    Thanks,
    Rahul

Maybe you are looking for

  • Lumia 710 doesn't update do 7.8

    I still can't update my Lumia 710 to WP 7.8 . I installed first 2 updates after forcing, but the 3rd one can't be installed. Zune doesnt even find the update without forcing. It always shows me error 80180048 after stopping installing. Windows Phone

  • Can I use my China iPhone 4S (MD242CH) in Canada with a Canada MicroSIM card

    I live in China and have a China iPhone 4S Model MD242CH currently subscribed to China Mobile. I will be going on vacation in Canada and I want to be able to take my iPhine 4S with me and change out my China Mobile MicroSIM card for a Canadian carrie

  • Can't add a portlet

    We have recently upgraded the database instance to 8.1.7.2 from 8.1.7.0. We are using 9iAs 1.0.2.1 and plan to upgrade to 1.0.2.2 in the near future. We have also renamed the database which I wouldn't think should have any impact. When we try to add

  • Studio 10 compiler bug with example

    The following example produces a crash on Solaris Intel with Sun Studio 10, but works with Workshop 6 update 2. This example describes the simple case of using Xerces-c C++'s DefaultHandler class from a shared library. Running "main" will crash using

  • CAB file

    Hello to all,   Does someone can explain to me how to decompress CAB file? where to download tool for it? Thanks in advance.    Kind Regards, Aleksandar