Problem with mac os safari browser...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gsuns82
    New Member
    • Mar 2007
    • 58

    Problem with mac os safari browser...

    Hi all,
    The following code is not working properly in Mac os/safari browser.

    [CODE=javascript]function newWindow(){
    window.open('<j stl_core:url value="/pages/orders/printAllPacking Slip.jsf"/>','jav','width =500,height=500 ,resizable=yes, scrollbars=yes' );
    } [/CODE]

    The problem i am having is,the above newWindow() will be called inorder to print all items,i can able to retrieve all values from DB,when click preview button of safari browser nothing gets displayed,this code works well in mozilla and IE.
    can u guide me to solve this problem?

    Thanks in advance,
    sundar
    Last edited by gits; Nov 12 '07, 08:08 AM. Reason: added code tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Can you show the code for the new window (the generated HTML/JavaScript, not JSF code).

    Comment

    • gsuns82
      New Member
      • Mar 2007
      • 58

      #3
      Originally posted by acoder
      Can you show the code for the new window (the generated HTML/JavaScript, not JSF code).
      Hi,
      I tried a code for disabling cache on any browser,but the safari browser on mac os still caching my page,so that it shows the same items on print priview from its cache.
      The code:
      ***********
      [CODE=php]function ae_nocache()
      {
      header("Expires : Tue, 03 Jul 2001 06:00:00 GMT");
      header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
      header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
      header("Cache-Control: post-check=0, pre-check=0", false);
      header("Pragma: no-cache");
      }
      [/CODE]
      Even i tried general <meta> with no-cache attribute,its ok for IE & Mozilla,but not working in safari browser on mac os.
      Can u give me a code so that i can prevent my page from being cached on safsari browser?

      Thanks in advance,
      sundar
      Last edited by acoder; Nov 12 '07, 11:41 AM. Reason: Added code tags

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        So you're using PHP to render the page?

        Try adding the date/time to the end of the URL to prevent retrieval from the cache (as a fix).

        Comment

        Working...