Tech Note: The Opera Conundrum
Here’s a tech note that will, as all tech notes do, almost immediately turn into a Friday night open thread.
I’ve gotten several complaints about the LGF front page crashing in the Opera browser, or taking forever to load if it doesn’t crash.
I traced the problem to a recent change in the way I was loading Javascript files; I was experimenting with combining all the Javascript into one big, big file, because requesting one file over the Internet is a whole lot faster than requesting multiple files. This technique worked well in Safari, Chrome, Internet Explorer 9, and Firefox, but Opera went into uncontrollable seizures, leaking memory all over the place and eventually locking up. In Linux (Ubuntu) it even took down the whole OS. Impressive. I suspect some kind of internal buffer overflow problem in Opera, but who knows?
So I abandoned the “one big file” approach, and broke the Javascript out into separate files again, and now Opera seems to be much happier with LGF. You don’t want to get the fat lady mad at you.
If you’re still having trouble in Opera, please let me know by posting a comment or using our Contact form (in the left sidebar). I’ve tested both Mac and PC versions here at LGF HQ and they pass with flying colors.
(At the risk of angering the fat lady, I cheated a little, and I’m still combining as many of the Javascript files as possible. If you look at the source of LGF, you’ll only see three Javascript files being explicitly loaded. And I also changed the way I’m loading the external AddThis and Google +1 Javascript files; they’re both fully asynchronous now, and they’re loaded in our jQuery $(document).ready()
function, which speeds things up significantly.)