[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6520] trunk



Revision: 6520
          http://sourceforge.net/p/ledger-smb/code/6520
Author:   einhverfr
Date:     2014-01-18 09:12:04 +0000 (Sat, 18 Jan 2014)
Log Message:
-----------
Correcting back button behavior after logout

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/Template.pm
    trunk/UI/logout.html

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2014-01-18 07:12:37 UTC (rev 6519)
+++ trunk/LedgerSMB/Form.pm	2014-01-18 09:12:04 UTC (rev 6520)
@@ -659,6 +659,7 @@
 <head>
 	<title>$self->{titlebar}</title>
 	<meta http-equiv="Pragma" content="no-cache" />
+	<meta http-equiv="Cache-Control" content="must-revalidate" />
 	<meta http-equiv="Expires" content="-1" />
 	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
 	$stylesheet

Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm	2014-01-18 07:12:37 UTC (rev 6519)
+++ trunk/LedgerSMB/Template.pm	2014-01-18 09:12:04 UTC (rev 6520)
@@ -432,6 +432,9 @@
 		$disposition .= qq|\nContent-Disposition: attachment; filename="$name"|;
 	}
         if (!$ENV{LSMB_NOHEAD}){
+            print "cache-Control: no-store, no-cache, must-revalidate\n";
+            print "cache-Control: post-check=0, pre-check=0, false\n";
+            print "Pragma: no-cache\n";
  	    if ($self->{mimetype} =~ /^text/) {
 		print "Content-Type: $self->{mimetype}; charset=utf-8$disposition\n\n";
 	    } else {

Modified: trunk/UI/logout.html
===================================================================
--- trunk/UI/logout.html	2014-01-18 07:12:37 UTC (rev 6519)
+++ trunk/UI/logout.html	2014-01-18 09:12:04 UTC (rev 6520)
@@ -6,7 +6,6 @@
   case this makes localization of the Opera error message essentially impossible
   so for this reason going to inline this functionality here. - Chris T -->
 <script>
-try{
 var agt=navigator.userAgent.toLowerCase();
 if (agt.indexOf("msie") != -1) {
 // IE clear HTTP Authentication
@@ -19,13 +18,7 @@
 	var xhre = new XMLHttpRequest() ;
         xhre.open("GET",'login.pl?action=logout_js',true,"logout","logout");
         xhre.send("");
-        xhre.abort();
-        //be aware, sometimes get-request reaches server despite abort.
-        // LedgerSMB::Auth::DB::get_credentials can have $auth=logout:logout
 }
-}
-catch (e) {
-}
 </script>
 <body class="<?lsmb dojo_theme ?>">
 <h1 class="info">
@@ -35,5 +28,6 @@
             text('Logout Successful');
           END; ?></h1>
 <p><a href="login.pl" target='top'><?lsmb text('Return to the login screen.') ?></a>
+<form id='submitform' action="login.pl" method="post"><input type="hidden" name="action" value="logout_js"></form>
 </body>
 </html>

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits