JavaScript works in Firefox and Safari, but not in Internet Explorer or Chrome

I manage the site for our training company. This site wants to implement Indeed.com API, which displays a set of features from Indeed. I received JavaScript code from the Indeed site (jobroll - see link ) and implemented it on the test page.

This test page is here here . Since you can use different keywords, I want the result of four keywords to appear in four columns, two columns per row. JavaScript code works in Firefox and Safari, but not in Internet Explorer or Chrome. I am not a coder and therefore need your help. What am I doing wrong or what is missing?

+4
source share
1 answer

The problem here is the mime type mismatch, as indicated in the console output of both Internet Explorer and Google Chrome. Looks like firefox just resolved this slide. It probably shouldn't be.

Consider the following code:

<script type="text/javascript" src="...indeed.nl/jobroll?q=tmap&l=&limit=10"></script>

This expects the jobroll resource to be a JavaScript resource (this is it if you check the response body). But the problem is that .nl really does send JavaScript, claiming it is HTML. A quick look at the response headers will show this:

enter image description here

, text/javascript, text/html. , Internet Explorer Chrome .

, , script, . , , .

+2

All Articles