2
Azuryu
4y

My colleague:
Working in this job double as long as me.

Also my colleague:
isSafari = navigator.userAgent.indexOf("Safari") > -1 (pro tip: almost any browser but Firefox contains Safari in it's user agent, because browsers lie)

Also wasn't able to check if autoplaying a video fails. It's not my primary department, I'm just helping fixing bugs there. They really need an employee with knowledge and experience. The last and only one got fired, so...

Comments
  • 1
    If you look at Useragents, you see history of browsers itself. It was at a time they now call the browserwars, where features where developed we today use or were forgotten. Websites were exclusive written for a browser and every browser wanted better features nobody had and all the features of others. Javascript was developed to integrate java-apps into the DOM and Web2.0 (non-static content) was the hot shit.
  • 1
    @stop I remember the time when websites were build with framesets and you could style the scrollbar in IE. Though neither me nor my colleague started their careers in these times, today browser sniffing rarely is necessary because you can get the job done with feature detection only (especially if you only need to look at current browser versions). In this case hiding a button was necessary, which could've done via detecting if the browser can play the WebM video format. If sniffing is still preferred, which is used a lot by them, I'd expect them to do it right.
  • 1
    @Azuryu you domt need to sniff. You can give a browser different formats and he chooses his prefered format.
  • 0
    @stop That's what I'm doing with images because retarded pieces of shit like Safari and IE can't display WebP. Only that IE isn't actually retarded in this regard, just obsolete. The picture element solves this neatly.
Add Comment