Servers not serving JS MIME type properly. Causing problems on Free Hosting.

Status
Not open for further replies.

epiccentury

New Member
Messages
24
Reaction score
0
Points
0
It appears that the servers are serving up the JS MIME type improperly. This is causing some problems with my site, mainly the inability to use "lightbox" on my website.

This is NOT a Cpanel MIME Type problem, this is a guaranteed server setup problem. How ever the server is setup to handle the MIME type is wrong. The .JS file extension should have the MIME type of "application/x-javascript" accepting the extensions of".js" and ".javascript".

This will need to be changed by the Cpanel Admin (Corey or other) in the main MIME type config. There should be a file in the root directory call "mime" or something along those lines with the definitions.
 
Last edited:

Synkc

Active Member
Messages
1,765
Reaction score
0
Points
36
Have you tried adding the MIME type into a .htaccess file - it should have privileges over the setting set in the server's mime.types file.

Code:
AddType application/x-javascript .js .javascript
 

epiccentury

New Member
Messages
24
Reaction score
0
Points
0
Ok, that's the same file as if you were hosting from home or corporate servers. I'll go in and add a few others. Seems that the server was what was doing it, but maybe this will work.
 

epiccentury

New Member
Messages
24
Reaction score
0
Points
0
Ok, so I tried what synkc said and it didn't help much. The headers are right now but it's still not displaying as application/x-javascript and is still displaying as a text file in cpanel. I've tried finding other people who are having this problem and have had no luck.

Any one have any other idea?
 

jakep

New Member
Messages
23
Reaction score
0
Points
0
CPanel displays like everything as a text file, and I believe that it is not a server problem because JavaScript is not a server application but a client side app. Try using a different computer to view the website and see what happens. BTW, what broswer and os are you using?
 
Status
Not open for further replies.
Top