I have trouble in using external javascript file when using either EJS or Pug. The problem is the external js file sent by the server is always loaded with MIME type of "text/html" by the browser, eventhough I have used the correct MIME type : "text/javascript".
As mentioned in some sources, even without explicit type, the script has a default MIME type of "text/javascript". But browser still loads the script with MIME type of "text/html".
How to overcome this problem ?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have trouble in using external javascript file when using either EJS or Pug. The problem is the external js file sent by the server is always loaded with MIME type of "text/html" by the browser, eventhough I have used the correct MIME type : "text/javascript".
As mentioned in some sources, even without explicit type, the script has a default MIME type of "text/javascript". But browser still loads the script with MIME type of "text/html".
How to overcome this problem ?