View
Posted 12 months ago by Henning Koch.

If possible your code should detect features, not browsers. But sometimes you just need to sniff the browser. And when...

Posted 11 months ago by Dominik Schöler.

At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (475k downloads...

Posted 11 months ago by Henning Koch.

Most forms have a single submit button that will save the record when pressed. Sometimes a form needs additional submit...

Posted about 3 years ago by Henning Koch.

The attached Coffeescript helper will let you create mouse events: $element = $('div') Trigger.mouseover($element) Trigger.mouseenter($element) Trigger.mousedown($element) Trigger.mouseup($element...

Posted 11 months ago by Dominik Schöler.

Google Chrome has a subtle rendering bug that hits me once in a while. It usually occurs in sliders with...

Posted 11 months ago by Henning Koch.

Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...

Posted 12 months ago by Dominik Schöler.

As a web developer, you know Google Analytics (GA). Probably you've dropped the GA snippet into more than one...

Posted 12 months ago by Henning Koch.

Why secure-only cookies used to be necessary Cookies have an optional secure flag. It tells the browser to not...

Posted almost 5 years ago by Arne Hartherz.

Safari on iOS accepts an apple-touch-icon favicon that is used for stuff like desktop bookmarks. Always define a...

Posted 12 months ago by Natalie Krehan.

Background information about session storage in Rails Rails has a default mechanism to store the session in the CookieStore. This...

Posted about 1 year ago by Dominik Schöler. litmus.com

The 90s are calling: they want their tables back. Unfortunately, you'll need them all for laying out your HTML...

Posted almost 3 years ago by Henning Koch. jakearchibald.com

The way that Javascript schedules timeouts and promise callbacks is more complicated than you think. This can be the reason...

Posted about 8 years ago by Ulrich Berkmueller.

These steps are now part of Spreewald. Here are some useful examples how to use the attached Cucumber Timecop steps...

Posted about 1 year ago by Dominik Schöler. caniuse.com

Since late 2015, all major browsers (still excluding Firefox) support pointing device media queries. These can be used to distinguish...

Posted about 1 year ago by Dominik Schöler. developer.mozilla.org

Here is how to model basic logic in media queries. AND With keyword and. # Target viewport widths between 500 and...

Posted over 7 years ago by Henning Koch.

The attached patch lets you find a record by a string or number in any column: User.find_by_anything('carla...

Posted almost 7 years ago by Henning Koch.

Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...

Posted about 1 year ago by Natalie Krehan. developer.mozilla.org

Browsers' printing methods usually don't print background colors. In most cases this is the desired behavior, because you don...

This website uses cookies to improve usability and analyze traffic.
Accept or learn more