Mixed Content: The page at 'https://w3codegenerator.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint

Updated at 19-Sep-2021, By samar

Sometimes you get the error Mixed Content: The page at 'https://w3codegenerator.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint in your console on call some ajax request on specific url with insecure XMLHttpRequest endpoint.

  • Remove http:// and add https:// on call ajax in url parameters to avoid insecure XMLHttpRequest endpoint request

    <script> 
    $.ajax({
        type: "GET",
        url: 'https://api.joind.in/v2.1/talks/10889',
        data: {
            format: 'json'
        },
        success: function(response){
            console.log(response);
        }
    }); 
    </script>
    

    Change from url: 'http://api.joind.in/v2.1/talks/10889',  to url: 'https://api.joind.in/v2.1/talks/10889', in ajax parameters

Back to code snippet queries related jquery