Igniter version '2.0.3' code JQuery 1.7 JQuery History Plugin
Hi guys,
I have a CodeIgniter app that I created in ajax style. I have a function as follows:
$(document).on('click','.ajax_link',function(e){
All he does is capture clicks on anchor elements with the ajax_link class and send a response to a function that handles the placement of this response data on the page.
This works in Chrome and FF. I click on the link, jQuery makes a request for retrieval, I return a JSON object, and my history.pushState () function injects some of the json data into my page.
I have a problem in IE8. Essentially, what happens when I first open the application, the links work, but they only work once. The second time I click the link:
- Is there ajax
GET
- Gets a response of 304 (not changed)
- Does not call the
jQuery.get()
callback function and therefore stops.
If I clear the cache, it works again. Therefore, I believe that IE is executing a get request, but then it sees that it has already requested the same file in the past ... and therefore completely stops the process.
Does anyone know about this solution? I searched for references to 304 errors and errors with ajax and caching in IE, but have not yet found a problem identical to mine.
Any help is much appreciated
(Tested on Windows Virtual Machine IE8 and IE 8 mode in Internet Explorer 9)
solvable
I just need to add the following code to my document.ready function, and the problem disappeared.
$.ajaxSetup ({cache: false});