Bug 5371: Force no caching for private pages at the OPAC
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 17 Sep 2015 11:45:15 +0000 (12:45 +0100)
committerLiz Rea <wizzyrea@gmail.com>
Fri, 11 Dec 2015 02:16:42 +0000 (15:16 +1300)
In order no to slow too much the browsing, it is certainly not a good
idea to add this cache-control value for all pages at the OPAC.

This patch just adds where the author found it could be useful.

Test plan:
1/ Login at the OPAC
2/ Go on the account page (opac/opac-account.pl)
3/ Click log out
4/ Use the back button of your browser
Without this patch you will see the previous page.
With this patch, the previous page will be reloaded and you will be
redirected to the login form.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit 542ab0bce949eba3abc98ff1c433fe6099db105d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Conflicts:
opac/opac-discharge.pl

opac/opac-account.pl
opac/opac-basket.pl
opac/opac-browser.pl
opac/opac-memberentry.pl
opac/opac-mymessages.pl
opac/opac-passwd.pl
opac/opac-privacy.pl
opac/opac-reserve.pl
opac/opac-search-history.pl
opac/opac-user.pl

index 71b8710..10ef689 100755 (executable)
@@ -75,5 +75,4 @@ $template->param (
        accountview => 1
 );
 
-output_html_with_http_headers $query, $cookie, $template->output;
-
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
index 9018012..81deeeb 100755 (executable)
@@ -136,4 +136,4 @@ $template->param(
     BIBLIO_RESULTS => $resultsarray,
 );
 
-output_html_with_http_headers $query, $cookie, $template->output;
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
index 7941e37..1fceb80 100755 (executable)
@@ -101,4 +101,4 @@ $template->param(
     have_hierarchy => $have_hierarchy,
 );
 
-output_html_with_http_headers $query, $cookie, $template->output;
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
index 01d0d01..d2dcb2f 100755 (executable)
@@ -231,7 +231,7 @@ $template->param(
     captcha_digest => md5_base64($captcha)
 );
 
-output_html_with_http_headers $cgi, $cookie, $template->output;
+output_html_with_http_headers $cgi, $cookie, $template->output, undef, { force_no_caching => 1 };
 
 sub GetHiddenFields {
     my ($mandatory) = @_;
index 81d4637..307a60a 100755 (executable)
@@ -48,4 +48,4 @@ my $messages = C4::Letters::GetRSSMessages( { borrowernumber => $borrowernumber,
 $template->param( message_list => $messages,
              );
 
-output_html_with_http_headers $query, $cookie, $template->output;
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
index bf6b175..cbd74c6 100755 (executable)
@@ -111,7 +111,7 @@ $template->param(firstname => $borr->{'firstname'},
                                                        passwdview => 1,
 );
 
-output_html_with_http_headers $query, $cookie, $template->output;
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
 
 sub goodkey {
     my ( $dbh, $borrowernumber, $key ) = @_;
index 2a66b96..8f9e4ac 100755 (executable)
@@ -77,4 +77,4 @@ $template->param( 'Ask_data'       => '1',
                     'privacyview' => 1,
 );
 
-output_html_with_http_headers $query, $cookie, $template->output;
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
index 11f2673..a8f44eb 100755 (executable)
@@ -591,5 +591,4 @@ if (
     );
 }
 
-output_html_with_http_headers $query, $cookie, $template->output;
-
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
index 736a88e..056969c 100755 (executable)
@@ -147,4 +147,4 @@ unless ( $loggedinuser ) {
 
 $template->param(searchhistoryview => 1);
 
-output_html_with_http_headers $cgi, $cookie, $template->output;
+output_html_with_http_headers $cgi, $cookie, $template->output, undef, { force_no_caching => 1 };
index 6aa1f93..295c792 100755 (executable)
@@ -396,5 +396,4 @@ $template->param(
     OpacHoldNotes => C4::Context->preference('OpacHoldNotes'),
 );
 
-output_html_with_http_headers $query, $cookie, $template->output;
-
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };