Greetings,

When you *initially* load LogicWeb's home page, www.logicweb.com it hesitates for about 1-2 seconds on loading the ajax tabs up top (you can't miss it, right below main navigation bar). I am trying to figure out why this happens, but I just cannot seem to grasp the cause.

I am not a designer / programmer by trade so I'm not quite sure what to look for within the javascript files.

Javascript:
www.logicweb.com/scripts/tabber.js

Any help on why it does not load instantaneously would be appreciated.

Ok,
There's nothing wrong with this bit of load time. It only took about 2 seconds for the page to load, and that's fine. Go to myspace and look at how long that piece takes to download.

To understand the "lag" you have to understand AJAX and what it is.

AJAX is taking a website and making it object oriented. You are using the "DOM" as it is called. The DOM should be the last thing to load on your browser. Since it is the last thing to load, any manipulation of it (AJAX) needs to wait until it is fully loaded.

Without looking at your tabber code, I am assuming that it's something that you didn't actually build yourself, I am aslo assuming that whoever wrote it did a good job and waited for DOM state 4 to occur (fully initialized) rather than saying "wait 2 seconds".

I know, conventionally, you expect items that appear at the top of the page to show up first, but that's not the case here. It is absolutely neccessary for any AJAX stuff to be the last things to load.
Sage

Sage, thank you for clarifying this in full detail. I appreciate that of you.

Thanks for the compliments on the site as well.

Just to put your mind at ease, there was a 1-2 second delay when first loading up your homepage, but then it showed up instantaneously as I navigated the site.

If it really bothers you that much, an idea might be to, by default, have non-Javascript versions of the tabs load at startup (where just the tabs themselves are clickable, with no menus). You could then add a line to the JavaScript file for the AJAX stuff to replace the contents that are there at startup. To the user, everything will load right away but it will just take a second or two for the dropdown menus to begin to work.

Note = I haven't read your javascript file so don't know how it's structured, but the general concept should be able to work.

Personally, I don't think it's necessary ... but, like I said, if it's something that's bothering you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.