Shwetank Dixit

Now with 50% more cool!

Subscribe to RSS feed

Posts tagged with "javascript"

jsFoo slides and thoughts

, , ,

This is a crosspost from my blog post on the ODIN blog.

So I was there at jsFoo in Bangalore last weekend, which I think was India's first exclusively JS based conference. The event was great, with a turnout which was greater than expected. We had talked on the some advanced JS tricks, stuff on the internal working of some JS engines, a few node.js talks, as well as my talk which was about how does JS fit into the mobile web.

The following are my slides:

One of the things I noticed was that, people knew about AppCache, but no about the events associated with them. So I tried highlighting them. I also noticed people asking the presenters who came before me about offline storage and how to sync it back to the server, so I provided an example of how to do it in case of a web form using localStorage. In the end, I also talked about device orientation and getUserMedia. I've linked some usefull resources to check out in the slides themselves, but I'll mention some here for the lazy wink

The event was full of wicked smart and cool people, and I hope to see this event happening again soon!

How the IFrame SSI script II blocks Opera and how to fix it

, , , ...

A lot of websites seem to be using the IFrame SSI script II available at Dynamic Drive (No, I wont be linking to the page!). This has been a considerable source of headache for our site compatiblity team as its seems to pop up on sites all around the world and blocks Opera.

Yes, it blocks Opera. For no reason whatsoever.

Around line 34 or so, it has this line of code

if (currentfr && !window.opera){

So basically the 'if' loop is entered if 'currentfr' has a value and if the browser is not Opera!. I have no idea why the script does it. Maybe when the script was made (in the seventh century or so p ) Opera had some behaviour different from other browsers, but I can't be sure about this.

Whatever the reason, this code is bad for Opera.

This is how to fix it...

Simply remove the
&& !window.opera
part from that line so that it becomes
if (currentfr){

and it should work across all browsers, including Opera!

There are other such scripts which cause problems in Opera simply because of bad coding, but this script is one of the biggest culprits in this regard. So remember, if you have to use the IFrame SSI script II script, make sure to remove the part I mentioned before making your site live.
May 2013
M T W T F S S
April 2013June 2013
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31