By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,576 Members | 1,360 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,576 IT Pros & Developers. It's quick & easy.

Problem with mac os safari browser...

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

Expand|Select|Wrap|Line Numbers
  1. function newWindow(){
  2.         window.open('<jstl_core:url value="/pages/orders/printAllPackingSlip.jsf"/>','jav','width=500,height=500,resizable=yes,scrollbars=yes'); 
  3.     } 
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
Nov 12 '07 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
Can you show the code for the new window (the generated HTML/JavaScript, not JSF code).
Nov 12 '07 #2

P: 58
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:
***********
Expand|Select|Wrap|Line Numbers
  1. function ae_nocache() 
  2. {
  3.     header("Expires: Tue, 03 Jul 2001 06:00:00 GMT");
  4.     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  5.     header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
  6.     header("Cache-Control: post-check=0, pre-check=0", false);
  7.     header("Pragma: no-cache");
  8. }
  9.  
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
Nov 12 '07 #3

acoder
Expert Mod 15k+
P: 16,027
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).
Nov 12 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.