<p>I have a script that works fine on my test server (using IIS6). The script processes an ajax request and sends a response with the following line:</p>

<pre><code>header( 'application/javascript' );
</code></pre>

<p>But on my live server, this line crashes the page and causes a 500 error.</p>

<p>Do I need to allow PHP to send different MIME types in IIS7? If so, how do I do this? I can't find any way on the interface.</p>

[{'answer_id': 81940, 'author': 'Sietse', 'author_id': 6400, 'author_profile': 'https://Stackoverflow.com/users/6400', 'pm_score': 8, 'selected': True, 'text': "<p>The header is incorrect, try this instead:</p>\n\n<pre><code>header('Content-Type: application/javascript');\n</code></pre>\n"}, {'answer_id': 1052918, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>take a look at <strong><a href="http://en.wikipedia.org/wiki/Mime_type" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Mime_type</a></strong></p>\n\n<p>There it says you should use application/javascript instead of text/javascript.</p>\n'}]
['https://Stackoverflow.com/questions/81896', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/15567/']