Mozilla adds -webkit prefix emulation to select sites in Firefox - gHacks Tech News

Mozilla adds -webkit prefix emulation to select sites in Firefox

Mozilla has added a new feature to Firefox 39 which emulates some -webkit prefixes on select sites to improve compatibility of those sites in the Firefox browser.

One issue that you may run into when browsing sites on the Internet is that web developers may have used vendor specific prefixes for styling. While that is not an issue if alternatives have been implemented, it can cause display issues when that is not the case.

Common prefixes are webkit, used by Chromium-based browsers, moz, used by Mozilla-based browsers, and ms used by Internet Explorer.

A comparison list of supported prefixes in rendering engines is available on this page. There you will notice that some prefixes don't have equivalents in other browsers, for instance if a specific property is not supported by that browser.

If you take a look at the following example, you will notice layout issues on the site in Firefox if you are using a pre-39 version to access it and no such issues in Firefox 39 or later.

firefox without webkitfirefox with webkit

The problem here is that these layout issues may reflect badly on the web browser and that appears to be the main reason why Mozilla decided to implement webkit prefix emulations for select websites.

The emulation is hardcoded into Firefox 39 which means that it will only work on a list of sites that Mozilla added to it specifically.

The majority of these sites appear to be Japanese and Chinese, with many of them related to images and mobile devices.

All sites listed should display better in Firefox 39 and especially in Firefox for Android considering that the majority of sites listed are mobile-related.

The main reason why this is implemented only for select websites is simple: if Mozilla would enable it for all, it would send a wrong signal to the web development community.

Firefox users can turn off the emulation on the browser's about:config page:

  1. Type about:config in the browser's address bar and hit enter.
  2. Confirm that you will be careful if the message comes up.
  3. Search for layout.css.unprefixing-service.enabled
  4. Double-click the preference.

A value of true means it is enabled, one of false that it is disabled in Firefox.

webkit prefix firefox

Check out bug 1107378 for additional information and implementation in the Firefox web browser.

This change won't affect Firefox users who don't visit sites supported by the workaround. It is however likely that the list of sites will be updated regularly. (via Sören Hentzschel)

Summary
Mozilla adds webkit prefix emulation to select sites in Firefox 39
Article Name
Mozilla adds webkit prefix emulation to select sites in Firefox 39
Description
Mozilla added webkit prefix emulation to select sites in Firefox 39 to improve compatibility with those sites.
Author
Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Sven said on May 9, 2015 at 10:45 am
    Reply

    “One issue that you may run into when browsing sites on the Internet is that web developers may have used vendor specific prefixes for styling. While that is not an issue if alternatives have been implemented, it can cause display issues when that is not the case.”

    Fixing that is supporting lousy web designers work. If they would do their job right, things like this wouldn’t happen.

    1. Erick said on May 9, 2015 at 1:57 pm
      Reply

      That’s the first thing that I thought!

    2. Visigoth said on May 9, 2015 at 7:19 pm
      Reply

      Damn right! That’s exactly my sentiment on this issue.

      Bad move, Mozilla. By supporting lazy developers who can’t even code properly, everyone on the Internet is worse off. And just now that M$ is complying as much as possible with web standards and doing their utmost with Edge, Mozilla decides to pull off a stunt like this. Who’s the bad browser now?!? :-/

      1. Dave said on May 10, 2015 at 12:32 am
        Reply

        I agree this is a bad move and should have been implemented as an extension if anything

      2. Mike Taylor said on May 11, 2015 at 7:31 pm
        Reply

        I think you’re a bit behind on what Edge actually supports. They support standards *in addition* to webkit prefixed APIs: http://az648995.vo.msecnd.net/win/2015/05/vendorprefixes1.png. For the exact same reason that Mozilla is moving towards this, as well.

        It’s not about supporting lazy developers, it’s about supporting *users* who deserve to have sites work on their browser of choice.

  2. Pd said on May 9, 2015 at 5:18 pm
    Reply

    This is a classic sign of desperation.
    It’s only when your market share starts to drop into single figures because you’ve dragged your arse keeping your product up to date – instead preferring to fork it into a mobile OS for the third world – that you need to take such measures.

    Developers lazily relying on vendor prefixes are morons but they can only get away with it because Firefox’s market share is dwindling towards single figures because of pathetic attitudes towards support for entreprise installs; the ridiculously long gestation of true multi process and bizarre decisions like punishing sites who don’t adopt SSL hosting whilst Mozilla itself is yet to deliver on letsencrypt!
    I really don’t want Firefox to lose relevancy but Mozilla is doing nothing about it. Their strategic decision to focus on a mobile OS whilst claiming such work would equally help Firefox on the desktop is just an indication of what seems to be delusional thinking. Many of the APIs built for Firefox OS are irrelevant to the desktop. Who needs a phone dialing API on a desktop? Maybe VoIP users but I doubt it. The gonk layer is irrelevant unless Mozilla plan to attack Chromebooks or provide boot2Firefox on TVs.

    The question really has to be asked: Mozilla now seems to see itself as the poor relation with no chance of competing with the big 3 (Google, Microsoft, Apple) rather than the nimble innovating upstart willing to take on a competitor with 90% share. With this defeatist attitude, is Firefox essentially in it’s death throes not because of big competitors but poor attitudes and strategy from management?

    We really should be celebrating Firefox’s new genuine multiprocess performance along with Mozilla’s attempt to fight back against the NSA with letsencrypt. Instead we’re seeing Mozilla take desperate compatibility hacks at the same time as Microsoft is announcing Edge will do away with all those rubbish proprietary APIs and the very same vendor prefixes Mozilla should be rejecting, not kludging their own browser to support!

    All of a sudden Microsoft is the moral leader of the open Web whilst Mozilla heads towards irrelevancy!

    Very sad.

    1. Mike Taylor said on May 11, 2015 at 7:26 pm
      Reply

      > All of a sudden Microsoft is the moral leader of the open Web whilst Mozilla heads towards irrelevancy!

      Microsoft does the same thing, for all websites (and for more prefixes/APIs).

    2. Spudley said on May 14, 2015 at 10:36 am
      Reply

      The really sad thing here is that nobody seems to be noticing the fact that Chrome is starting to use exactly the same tricks that Microsoft used in IE4/5/6 to win the first browser war.

      In the 1990’s it became popular to put a button on your site saying “Best viewed in IE”. These days, developers don’t do that, but they are still making their sites browser specific and not bothering to test in anything other than Chrome.

      Opera has already dropped out of the race, Mozilla is struggling to keep up it’s share, and Microsoft is still struggling with it’s reputation from IE6. At the rate things are going, we’ll end up with Chrome being the only browser, and we’ll be back to the situation we had with IE6, just with a different company calling the shots.

      There’s a massive danger in having a browser monoculture. It may be convenient from the web developer’s perspective to only have to test on one browser, but I really don’t want to see it again. I’ve been through that once already, and it wasn’t pretty.

  3. GunGunGun said on May 9, 2015 at 6:31 pm
    Reply

    They should not do that, i hate bad design and they should get punished instead supported.

  4. Neal said on May 9, 2015 at 9:30 pm
    Reply

    One of the sites listed is Yahoo Japan. What irony!

  5. LogicDaemon said on May 10, 2015 at 10:31 am
    Reply

    I think webkit *must* deprecate prefixes once they got standartized (and drop in a version two after deprecation). This will discourage use of prefixed properties in long-term-use systems (which are built once and rarely updated afterwards) and will force administrators of frequently-updated sites to update their styles asap after standardizing.

    This way, situation like with IE6 won’t happen again.

  6. Srap said on May 11, 2015 at 10:36 am
    Reply

    They should just put out pop-up bars saying “This website has poor CSS coding: please blame the site developers”.
    Simple and honest.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.