This is an interesting issue, sometimes we see in FireFox 9 and above an issue where the tab title will actually get set to a state where it says “Connecting” and the spinner is constantly in motion.
One of the things I found recently when I discovered this was quickly writing out DOM elements and then Removing them.
Recently, I had an issue where I was trying to figure out how to create an iframe, and then append some items into it. Well, it turns out to not be nearly as complicated as I thought.
The Better way
By now, we are all using some compiler to compile your code. Right? If you haven’t started, grab the Closure Compiler to follow through on this example.
- Download the latest Closure Compiler http://closure-compiler.googlecode.com/files/compiler-latest.zip
- Copy the compiler.jar file into your directory with the JS Files.
- follow along below and enjoy!
Question: Image – inline Script – image, are the images parallel?
Souders just posted the following tweet.
Someone out in #webperf land should test how inline scripts block downloads – eg, image – inline script – image – are the images parallel?
So here is my response to the question…
During the course of building web apps, we usually end up with functions to do certain tasks. However, since those tasks sometimes need to be done differently in each of the browsers, we end up with large if else statements to get the job done.
This is where Self Defining Functions come in handy.
In the 3rd chapter, Literals and Constructors, I noticed this section on “Patterns for enforcing new” with the following entry:
When your constructor has something like this.member and you invoke the constructor without new, you’re actually creating a new property of the global object called member and accessible through window.member or simply member. This behavior is highly undesirable, because you know you should always strive for keeping the global namespace clean.
I was just looking through a new blog post from Brendan Eich over on
AMinuteWithBrendan where he went into some detail on Closures versus
After listening to his pod cast, (you can find the transcript here), I decided to put
the two patterns to test. So I fired up a new test on JSPerf.com
Handling writing and updating objects in an iframe can be bothersome in most browsers. Sure things like jQuery tend to help, but not always.
A normal way to access a frame in jQuery is below:
Now, lets say you actually want to get another element inside of the frame, lets get the HEAD element.