Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-24-2012, 10:09 AM   PM User | #1
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
Ie ajax problem!

Hi!

I have a problem with ajax and IE ... it works of course in all other browsers... when i google for some sollution i found that problem is in IE revalidating cache or something like that: i tried few things what i found like:

in index i tried to add: <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

in php script which is calling by ajax:

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");

and in JS:

$.ajaxSetup({
cache: false // for ie
});

but nothing help ... any ideas? I would be glad! thx

and code which is not working:

Code:
$(function() {

    $("aside #bottom_registration input#userid").keyup(function(event){
       
        var nick=$(this).val();
        
            $.ajax({
               
               type: "POST",
               url: "modules/check_name.php",
               data: { userid:nick },
               dataType: "json",
               cache: false,
               success: function(data) {
                   
                   $('div.error').html(data.result);
                 
               }  
                
            });       
    });  
    
});

Last edited by Trki; 07-24-2012 at 10:17 AM..
Trki is offline   Reply With Quote
Old 07-24-2012, 03:22 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,365
Thanks: 18
Thanked 348 Times in 347 Posts
sunfighter is on a distinguished road
I hope you have a doc type. With out one IE chokes and pukes. Start there. If still not working post the entire code or better link to a site.
sunfighter is offline   Reply With Quote
Old 07-24-2012, 03:40 PM   PM User | #3
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
Quote:
Originally Posted by sunfighter View Post
I hope you have a doc type. With out one IE chokes and pukes. Start there. If still not working post the entire code or better link to a site.
yea sure, and hm i cant :/ i have no idea how to fix it ah. Didnt i broke some principle?
Trki is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:54 PM.


Advertisement
Log in to turn off these ads.