Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts

    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 11:17 AM.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,710
    Thanks
    25
    Thanked 660 Times in 659 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •