Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught SyntaxError: Unexpected token < #2

Open
codeofsumit opened this issue May 26, 2014 · 4 comments
Open

Uncaught SyntaxError: Unexpected token < #2

codeofsumit opened this issue May 26, 2014 · 4 comments

Comments

@codeofsumit
Copy link

i tried to figure this one out myself but i'm stuck. As soon as i include tablesorter.js (production and development versions) I'm getting this error:

Resource interpreted as Script but transferred with MIME type text/html: pathToTablesorter.js
Uncaught SyntaxError: Unexpected token <

I researched but i couldn't figure it out. It's defenitely not a problem with my server as 20 other JS files load correctly.

It's included like this
<script src="js/tablesorter.min.js"></script>

If i open tablesorter in eclipse, everything looks fine. If I open it in chrome dev tools, i see my web-page HTML. Maybe i did a stupid mistake somewhere but unless I'm totally blind, the script-tag is fine.

Is tablesorter - by itself without initializing it in javascript - rendering the DOM allready by just being included? Because my tables are created and populated via AJAX and they're not complete on page load (the HTML my be invalid if tablesorter checks the tables on page load automatically).

@dougfarre
Copy link

+1

@lukewatts
Copy link

lukewatts commented Sep 13, 2018

@codeofsumit can you check the encoding is not UTF8 BOM instead of UTF8?

@codeofsumit
Copy link
Author

@lukewatts the issue is over 4 years old. I don't use the library anymore

@lukewatts
Copy link

@codeofsumit True. @christianbach should be closing all these issues and maybe marking the library deprecated or unmaintained...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants