0

I created a JS file and uploaded to static resources in Salesforce. It identifies the mime type as application/x-javascript. So unable to open the file in Dev console, because it support application/javascript.

How to create and upload application/javascript file ?

1

1 Answer 1

2

What I experienced in past that mime type (for static resources) depends on the browser used to upload the file. I got the below mime types for same javascript file from different browser.

Chrome - application/javascript

Firefox -application/x-javascript

IE 11- application/octet-stream

So you can try to upload the file from chrome and see if you get application/javascript as mime type.

Or else you can use Eclipse IDE to change the mime type. Change the MIME type in the static resource's meta XML file from application/x-javascript to application/javascript.

1
  • Yes I changed the mime type using the Eclipse. Commented May 27, 2016 at 10:59

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.