I came across a code snippet that I found here:
After testing it on Firefox with two different domains, everything worked perfectly. However, when I attempted to run it on Google Chrome, I encountered the following warning:
Resource interpreted as Script but transferred with MIME type text/html:
Along with this error message:
Uncaught SyntaxError: Unexpected token <"
While I haven't yet tried it on IE, it's not a major concern for me at this point. As someone who is relatively new to this sort of thing, I'm struggling to identify what might be causing the issue.
Note: I prefer not to utilize JQuery for this task