Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

I am trying to use Ajax on IE9 and IE8 but could not make it.

I am trying to use Ajax on IE9 and IE8 but could not make it. I researched here and on the other pages and tried all the ways on there. This is the code which I currently have.

    $.ajax({
        url: 'https://example.com' + new Date().getTime(),
        cache: false,
        type: 'GET',
        dataType: 'json',
        contentType: "application/json; charset=utf-8",
        beforeSend: function(xhr) {
            xhr.setRequestHeader("Authorization", "Authorization Key");
        },
        success: function(data) {
            console.log('success');
        }
    });

If you know any tips, please give me advice. Thank you in advance.