Boxed software has 'em, now the web does too.
"system requirements" is printed on the side of nearly every piece of packaged software on the planet.
But on the web we still build like it's 1999.
I thoroughly believe that in a lot of cases you get what you tolerate and we've been putting up with backward compatibility for ages and thus, crippling the awesomeness that is the web.
Let's build for the future of the web, not its past.
chrome 20+ or firefox 20+ or safari 5+(only)
safari 5(will only pass for safari 5)
ie 8+ or chrome 5+ or fx 4+ or safari 5+
true(or anything truthy) the test is considered passed.
systemRequirmentsfunction simply returns a boolean,
trueif requirements are met
falseif they're not.
// a string of acceptable browsers, redirect if not passingif !systemRequirements'chrome 25+ or firefox 20+ or safari 3+'// redirect to helpful page, etc.windowlocation = '/system-requirements';// could also be a string of browsers + arbitrary testsvar return true;systemRequirements'chrome 25+ or firefox 20+ or safari 3+' someFunction someFunction;// or just tests and a fail urlsystemRequirements return true;;// you could have as many tests as you want, doesn't matter.var return true;;systemRequirementssomeTest someTest someTest someTest someTest someTest;
That's it, that's all there is to it.
follow @HenrikJoreteg on twitter <3