Quantcast
Channel: Nifty Snippets
Browsing index pages (35 articles)
↧

Common `fetch` errors

The new fetch API is a great improvement on XMLHttpRequest but it does have a very surprising behavior that catches people out a lot. Separately, because it uses promises, a lot of people using it fall...

View Article


Automatic Semicolon Insertion

I've been recommending to people that they not rely on Automatic Semicolon Insertion for years now, and frankly wish that the strict variant had removed it. Just wanted to share the best argument for...

View Article


JavaScript's Date/Time Format Is Not ISO-8601

TL;DR JavaScript's date/time string format isn't ISO-8601. It's much simpler, covers fewer use cases, and assumes strings written without a timezone indicator are in UTC (whereas ISO-8601 assumes...

View Article

VirtualBox -- USB not working

Just a snippet today, as much to remember it as anything else: If you're using VirtualBox on Linux and USB devices aren't working despite the fact you've installed the extension pack, it's because you...

View Article

Chrome and Java

If you use Chrome and are unfortunate enough to still have to use Java applets from time-to-time, you may recently have been unpleasantly surprised to find that the Java plug-in stopped working (if you...

View Article


Session tokens, cookies, and local storage

Link-post today, the Meteor blog has a very interesting post about why Meteor has so-far avoided session cookies in favor of localStorage, including a high-level but nevertheless useful overview of...

View Article

Centering Made Easy

Almost a note-to-self today. :-) Now that IE6 and IE7 are dead unless you need to support users from the far East, centering content within elements using CSS is dead easy. Three simple rules:display:...

View Article

Plain JavaScript

"I want to do this with pure JavaScript, not jQuery." "How do I do this with raw JavaScript?" "I don't like to use libraries, I like to use vanilla JavaScript." Enough! Using a library like jQuery (or...

View Article


Windows Pop-Up Shutdown Script

Sometimes, you want to configure a Windows system so that it shows a message when shutting down. In my case, it's to remind me (because I'm too bone-headed to remember!) to unmount any shares on the...

View Article


Submitting forms programmatically

Very short one today, folks, because something surprised me: If you use jQuery to submit a form programmatically, it will trigger submit handlers on the form. This surprised me because if you use the...

View Article

Help me find something?

Very unusual post today, folks: I'd like to ask you to help me find something. Several years ago, I found a blog post by a woman whose name I can't remember where she (incredibly) created a tabbed...

View Article

Private properties in ES6 -- and ES3, and ES5

JavaScript famously lacks private properties on objects. The next version will have them (more on that below), but we can have most of the benefits of the upcoming improvement right now (without...

View Article

Opera switching to WebKit+V8

Opera has decided to switch to using WebKit and V8 for for all new products. First they'll start with a product for smartphones (since as they say, many mobile-facing sites are only/best tested on...

View Article


Amazon S3 Adds Root Domain Support

More interesting news from Amazon: Now S3 supports static website hosting on the root of your domain. So in addition to http://www.example.com you can now have http://example.com. This comes warm on...

View Article

Website Feedback Popups

You want my feedback on your website? Here's my feedback: Website "feedback" popups are irritating and intrusive.

View Article


Font Size Units

I've always used points (pt values) for sizing fonts on web pages, e.g.:body { font-size: 12pt; }Those of you who know me know that I'm a developer, not a designer (in the web designer sense; I design...

View Article

Blitz.io Updates Pricing Model

Early this month I was checking out blitz.io and although it looked like a cool tool (and fun), the pricing model stopped me looking at it too closely, for reasons I explained to them:Hi folks, Was...

View Article


Asynchronicity

I see questions like this one a fair bit: The author has written this code (and is apparently using jQuery):function Obj() { this.id = 0; this.name = ''; } Obj.prototype.setName = function(name) {...

View Article

I Don't Want To Create An Account

Note to online vendors:I don't want to have to create an account to give you business.Got it? By all means offer me the option of doing so, if that makes you happy, but if I'm buying 10 quid of...

View Article

You can contribute to caniuse.com

I'm sure most of us have referred to (and probably cited) caniuse.com at some point. It's probably the most comprehensive collection of browser feature support around. Want to know the status of CORS...

View Article
Browsing index pages (35 articles)


Latest Images