In HTML, script element has optional charset attribute.
What is the purpose of it?
When is it useful?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If your javascript files are encoded with a different encoding than the page is using, you can use the
charsetattribute to tell the browser how to interpret it.For example, if the page is using
Latin1, but the JS file was created withUTF-8.