[-] FO : Apply changes from commit 1.4.X 1d0d59845b5f9cb9333a89e60523ab41df076d89 no cache for POST queries
This commit is contained in:
+13
-2
@@ -27,6 +27,16 @@ $(document).ready(function() {
|
||||
initTableDnD();
|
||||
});
|
||||
|
||||
function objToString(obj) {
|
||||
var str = '';
|
||||
for (var p in obj) {
|
||||
if (obj.hasOwnProperty(p)) {
|
||||
str += p + '=' + obj[p] + '&';
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function initTableDnD(table)
|
||||
{
|
||||
if (typeof(table) == 'undefined')
|
||||
@@ -119,9 +129,10 @@ function initTableDnD(table)
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
async: false,
|
||||
url: currentIndex + '&token=' + token + '&' + $.tableDnD.serialize(),
|
||||
data: params,
|
||||
url: currentIndex + '&token=' + token + '&' + 'rand=' + new Date().getTime(),
|
||||
data: $.tableDnD.serialize() + '&' + objToString(params) ,
|
||||
success: function(data) {
|
||||
var nodrag_lines = $(tableDrag).find('tr:not(".nodrag")');
|
||||
|
||||
|
||||
+4
-2
@@ -61,7 +61,8 @@ function doAjaxLogin(redirect) {
|
||||
$('#login_form .ajax-loader').fadeIn('slow', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax-tab.php",
|
||||
headers: { "cache-control": "no-cache" },
|
||||
url: "ajax-tab.php" + '?rand=' + new Date().getTime(),
|
||||
async: true,
|
||||
dataType: "json",
|
||||
data: {
|
||||
@@ -92,7 +93,8 @@ function doAjaxForgot() {
|
||||
$('#forgot_password_form .ajax-loader').fadeIn('slow', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ajax-tab.php",
|
||||
headers: { "cache-control": "no-cache" },
|
||||
url: "ajax-tab.php" + '?rand=' + new Date().getTime(),
|
||||
async: true,
|
||||
dataType: "json",
|
||||
data: {
|
||||
|
||||
@@ -117,10 +117,11 @@ function ProductTabsManager(){
|
||||
}
|
||||
|
||||
return $.ajax({
|
||||
url : $('#link-'+tab_name).attr("href")+"&ajax=1",
|
||||
url : $('#link-'+tab_name).attr("href")+"&ajax=1" + '&rand=' + new Date().getTime(),
|
||||
async : true,
|
||||
cache: false, // cache needs to be set to false or IE will cache the page with outdated product values
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
data: data,
|
||||
success : function(data)
|
||||
{
|
||||
|
||||
+2
-1
@@ -263,7 +263,8 @@ function setCurrency(id_currency)
|
||||
{
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: baseDir + 'index.php',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
url: baseDir + 'index.php' + '?rand=' + new Date().getTime(),
|
||||
data: 'controller=change-currency&id_currency='+ parseInt(id_currency),
|
||||
success: function(msg)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user