upload doc with .js extension

  • Answered
Uploaded javascript document--both through Filezilla and through Notepad++--it shows as text/x-generic type in my fie manager. Before uploading it was fine, with javascript icon and the .js extension. It still has .js extension--but shows as plain text file. Help! How can I upload a javascript file --or turn a text file into a javascript file in file manager? Thanks.
Hello Isaine, and thanks for your question. It would appear that the cPanel File Manager doesn't display the appropriate MIME type for JavaScript files with the .js extension. However, if you view the same file on the server-side via your FTP client like FileZilla, it looks like it is recognizing it correctly. You can also test it in your web-browser, for instance with Google Chrome if I load up a JavaScript file from my website. I can then hit F12 to bring up the Developer Tools and navigate to the Network tab, I can clearly see that it's coming into my web-browser as a text/javascript type. If you are not seeing this behavior, I have seen around the web from some searching on the matter that some people fixed corruption issues by saving their JavaScript files in UTF-8 format prior to uploading. I don't actually see any .js extension files on your account at the moment. So if you're still having issues please leave it on the server so we can inspect it to see what might possibly be the issue. - Jacob