MIME error on sharepoint error

t 21 Reputation points

I am trying to reference a .js file uploaded to the site document library. but on ececuting it gives an error. please note that this did not exist before

code in solution
tag.src="link-to-the document.js"

But i am getting a MIME error , that says that refused to execute text/html.

where am i going wrong? also why is this issue appearing all of a sudden and it didnt exist before.

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
6,049 questions
No comments
{count} votes

Accepted answer
  1. Jerryzy 10,301 Reputation points

    Hi @t ,

    Try to reference a Js file in SharePoint classic page like this, use "text/javascript" instead of "application/javascript":


    Best Regards

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments

0 additional answers

Sort by: Most helpful