12
odite
83d

Fuck Safari

Comments
  • 2
    double for ios safari. goddamn autohide fucking bullshit 🤬🤬🤬
  • 0
    YES
    I have a prod problem that I cant eve debug because im at home and don't have a mac.
  • 2
    Me: *programs website with webp images and uses moderizer to change them to png if the web browser doesn't support webp*

    Chome: *loads webp*
    Firefox: *loads webp*
    IE: *loads PNG*
    ...
    Safari: *fails to load the webp or the png even though the background-image is set correctly as it literally works in IE*

    Safari = worse than IE
  • 3
    Fuck apple
  • 0
    @futurelucas4502 Sounds like you havn't used the "picture" tag?! You don't do browser detection, you let the browser choose instead.
  • 1
    @molaram I second that
  • 1
    @Fast-Nop it's a background-image so I can't really use the picture tag (everywhere it's not a background I am using a picture tag tho) and the code is definitely working as the background-image gets set to background.png and it works perfectly on IE but on safari it just doesn't load the image which is pretty cool
  • 1
    @futurelucas4502 One trick is to have a div with picture tag, set that to display:none and then get its current img src via JS, and use that to set the background. It's a bit of abusing the picture tag, but you get around browser detection pitfalls.

    On the other hand, large background images where the difference between Webp and PNG would even be noticeable should probably not be used anyway.
  • 1
    @Fast-Nop I hadn't thought of using a picture tag like that I may try it however I have been using moderizers webp tool its a JS script which will just detect if the browser has webp support or not then add webp or no-webp as a class to the html tag then u just set in ur css what u want the background to be accordingly however safari says no and its just annoying bc it even works in IE but I will definitely try using the picture method it's a bit jank but like if it works it works ig
Add Comment