[webkit-dev] Which MIME type is best for JavaScript in WebKit?

Eric Seidel eric at webkit.org
Sat Feb 12 21:58:24 PST 2011


sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
-kill will tell LS to delete its database (which it will then regen
anew).

see /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
--help for more options.

My theory is that on affected systems some Application (I believe
DashCode) is registering for .js with a different mimetype than the
default (or other applications).

Unfortunately, looking at:
/Developer/Applications/Dashcode.app/Contents/Info.plist
disproves my original theory that this "incorrect" mime type was added
by DashCode:

                <dict>
                        <key>UTTypeConformsTo</key>
                        <array>
                                <string>com.netscape.javascript-source</string>
                        </array>
                        <key>UTTypeDescription</key>
                        <string>Dashcode JavaScript Document</string>
                        <key>UTTypeIdentifier</key>
                        <string>com.apple.dashcode.javascript</string>
                        <key>UTTypeReferenceURL</key>
                        <string>http://www.apple.com</string>
                        <key>UTTypeTagSpecification</key>
                        <dict>
                                <key>public.filename-extension</key>
                                <array>
                                        <string>js</string>
                                </array>
                                <key>public.mime-type</key>
                                <string>application/x-javascript</string>
                        </dict>
                </dict>


-eric

On Sat, Feb 12, 2011 at 5:19 PM, Darin Adler <darin at apple.com> wrote:
> On Feb 12, 2011, at 3:36 PM, Eric Seidel wrote:
>
>> And I think I've fixed it by resetting my launch services.
>
> What does that mean, precisely? I’m familiar with Launch Services on Mac OS X, but not with a resetting procedure.
>
>    -- Darin
>
>


More information about the webkit-dev mailing list