update
This commit is contained in:
19
modules/pagecache/views/templates/hook/index.php
Normal file
19
modules/pagecache/views/templates/hook/index.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* This file protect the directory
|
||||
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
|
||||
*
|
||||
* @author Jpresta
|
||||
* @copyright Jpresta
|
||||
* @license See the license of this module in file LICENSE.txt, thank you.
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
@@ -0,0 +1,37 @@
|
||||
{*
|
||||
* Page Cache Ultimate, Page Cache standard and Speed pack are powered by Jpresta (jpresta . com)
|
||||
*
|
||||
* @author Jpresta
|
||||
* @copyright Jpresta
|
||||
* @license See the license of this module in file LICENSE.txt, thank you.
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
function addNoCacheParam() {
|
||||
let links = document.querySelectorAll("a");
|
||||
for (let i = 0, len = links.length; i < len; i++) {
|
||||
let e = links[i].href;
|
||||
if (e.indexOf(document.location.href + '#') >= 0) {
|
||||
// Some browsers add the full URL of the current document in front of internal anchor links so we remove it
|
||||
e = e.replace(document.location.href, '');
|
||||
}
|
||||
let n = "_pcnocache=" + (new Date().getTime());
|
||||
let r = (typeof baseDir !== 'undefined' ? baseDir : prestashop.urls.base_url).replace("https", "http");
|
||||
if (typeof e != "undefined" && e != "" && e.substr(0, 1) != "#" && (e.replace("https", "http").substr(0, r.length) == r || e.indexOf('://') == -1) && e.indexOf('javascript:') == -1) {
|
||||
if (e.indexOf('?') >= 0) {
|
||||
n = '&' + n;
|
||||
}
|
||||
else {
|
||||
n = '?' + n;
|
||||
}
|
||||
let anchorIdx = e.indexOf('#');
|
||||
if (anchorIdx >= 0) {
|
||||
links[i].href = e.substring(0, anchorIdx) + n + e.substring(anchorIdx);
|
||||
}
|
||||
else {
|
||||
links[i].href += n;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
setTimeout('addNoCacheParam();', 200);
|
||||
</script>
|
||||
File diff suppressed because one or more lines are too long
100
modules/pagecache/views/templates/hook/pagecache-infos.tpl
Normal file
100
modules/pagecache/views/templates/hook/pagecache-infos.tpl
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user