My code works perfectly fine on localhost. However, when I copied and pasted the exact same code on my live server I got this error message: Failed to load resource: the server responded with a status of 404 (). I checked my folder path and it looks correct to me. I don't know what is wrong here. 

```
var folder = "image/";
$(document).ready(function () {
    $.ajax({
        url: folder,
        success: function (data) {
         console.log("successful load")
            $(data).find("a").attr("href", function (i, val) {
                if (val.match(/\.(jpe?g|png|gif)$/)) {
                      theImageList.push(folder + val );
            };
        })
            left_show_image(theImageList[shuffledComparison[0][0]],window.innerWidth/10*4.88, screen.width/3, "left")
            right_show_image(theImageList[shuffledComparison[0][1]],window.innerWidth/10*4.88, screen.width/3, "right")\
        },
        error: function(){
            alert("cannot read your folder")
        }
    })
})

```

This is really confusing to me and I would appreciate any advice.