Permalink
Browse files

prevent browser caching

  • Loading branch information...
1 parent 036b419 commit 001c8cf7fdbbd88884d9526388d3e2e7fa7a111b Stefan Siebel committed Apr 11, 2011
@@ -137,6 +137,7 @@ var Controller = function(spec, my) {
processData: true,
contentType: "application/json",
data: data,
+ cache:false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -160,6 +161,7 @@ var Controller = function(spec, my) {
type: "GET",
processData: false,
contentType: "application/json",
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -183,6 +185,7 @@ var Controller = function(spec, my) {
type: "GET",
processData: false,
contentType: "application/json",
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -209,6 +212,7 @@ var Controller = function(spec, my) {
processData: false,
contentType: "application/json",
data: data,
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -232,6 +236,7 @@ var Controller = function(spec, my) {
type: "GET",
parseData: false,
contentType: "application/json",
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -261,6 +266,7 @@ var Controller = function(spec, my) {
processData: false,
contentType: "application/json",
data: data,
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader("X-Http-Method-Override", "PUT");
@@ -285,6 +291,7 @@ var Controller = function(spec, my) {
type: "POST",
processData: false,
contentType: "application/json",
+ cache: false,
beforeSend: function(xhr)
{
xhr.setRequestHeader("X-Http-Method-Override", "DELETE");
@@ -346,6 +346,7 @@ var Controller = function(spec, my) {
processData: true,
contentType: "application/json",
data: data,
+ cache:false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -369,6 +370,7 @@ var Controller = function(spec, my) {
type: "GET",
processData: false,
contentType: "application/json",
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -392,6 +394,7 @@ var Controller = function(spec, my) {
type: "GET",
processData: false,
contentType: "application/json",
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -418,6 +421,7 @@ var Controller = function(spec, my) {
processData: false,
contentType: "application/json",
data: data,
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -441,6 +445,7 @@ var Controller = function(spec, my) {
type: "GET",
parseData: false,
contentType: "application/json",
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
@@ -470,6 +475,7 @@ var Controller = function(spec, my) {
processData: false,
contentType: "application/json",
data: data,
+ cache: false,
beforeSend: function( xhr )
{
xhr.setRequestHeader("X-Http-Method-Override", "PUT");
@@ -494,6 +500,7 @@ var Controller = function(spec, my) {
type: "POST",
processData: false,
contentType: "application/json",
+ cache: false,
beforeSend: function(xhr)
{
xhr.setRequestHeader("X-Http-Method-Override", "DELETE");
Oops, something went wrong.

0 comments on commit 001c8cf

Please sign in to comment.