3 ms·
Speaking of awful code. 17 days ago, when the new Galaxy "demo" page launched from Samsung, they had that webpage, www.tgeltaayehxnx.com with the countdown.. yo
by chrisacky 14y ago
Speaking of awful code. 17 days ago, when the new Galaxy "demo" page launched from Samsung, they had that webpage, www.tgeltaayehxnx.com with the countdown.. you guys remember?
Anyway, I was interested to see what was happening with that page out of interest so I checked out the source.
What I found made me laugh so hard. Given the fact that I knew that second perfect cache invalidation is pretty hard...and given time zones... I knew that this wouldn't end well. What happened as a result? They created their own distributed denial of service that was set to fire off every connected user at the same time. They ended up taking down their new launching page for their phone.
This was the code:
if (timediff < 0) {
//console.log("LIVE!");
location.reload(true);
} else {
// Do stuff.
}
Whoever wrote that code, was basically checking if the time difference between the countdown was zero and then refresh the page. Guess what? This ran continuously. For thousands of clients...
I wonder what kind of jokes they had at Samsung over this one.