I've made some changes to the JavaScript that powers DaniWeb today. Can those of you who have JS/AJAX/DHTML disabled please enable it and let me know if it corrects the speed problems you were having.

Thanks!

Recommended Answers

All 28 Replies

In tune with optimizing the JS this weekend, the navigation menu dropdown has been altered to figure out whether you intend to check out the dropdown menu or are just passing over it, in which case it won't drop down on you.

Before I start getting complaints about this, I'm just going to throw it out there ...

The functionality to manually disable Javascript on DaniWeb has been removed. This feature was added as a debugging tool when we were having problems with some of our JavaScript features. All of these problems have since been rectified, and we've been left with a good number of members who have been disabling this feature because they don't realize what it does, only to receive constant complaints by these members that things aren't working the way they're supposed to, or they don't understand why they can't access a particular feature, only to get frustrated with DaniWeb. Additionally, over the past year, some of our JavaScript features have no longer just been cosmetic or offered an easier way to do something but instead are offering the only way to access a feature. In an effort to offer a more standardized experience for everyone, where everyone is able to enjoy all of the features that DaniWeb has to offer, I've decided to no longer allow members to manually turn off JavaScript. Javascript features will automatically be unavailable on unsupported browsers.

The following are the reasons why this ability was created in the first place:
The javascript that was rounding the corners of some of the boxes (purely cosmetic) was causing browser hanging problems => FIXED
The tooltips were following the mouse => CHANGED
The tooltips weren't displaying correctly in IE6 => FIXED
The tooltips appeared as soon as the link was hovered over => They now offer a delay
The navigation dropdown menu kept popping down when people moved their mouse past the menu => The dropdowns now requires a delay over the menu
The navigation dropdown menu was hanging the browser in IE6 => FIXED

commented: Now that's what I call serious debugging! +14

Arrrrghhhh! The maddening bumbling tips are back! There is no perceptible delay. Put it back the way it was!

There is a delay. They don't follow the mouse anymore, and there's a delay when hovering over the link.

I can move the mouse up and down the list without the mouse activating every single link, following me.

i dont know whether its to do with this, or a load of hotfixes i installed, but windows mobile PDAs no longer crash when displaying threads

> i dont know whether its to do with this, or a load of hotfixes i installed, but windows mobile
> PDAs no longer crash when displaying threads

It's the Hot fixes you installed, not Javascript.

well, when it crashed it used to come up with "a script is causing your device to become unresponsive" (seemed to do it for bbc and digg too)

Does it still do it with the other sites?

yeah, ill try hard-restting my device later to see if it was the hotifes or your changes.

There is a delay. They don't follow the mouse anymore, and there's a delay when hovering over the link.

I can move the mouse up and down the list without the mouse activating every single link, following me.

This is not accessible to people with mild dyslexia. It destroys the ability to use the mouse pointer to keep your place.

The delay is about a quarter of a second - too short. 5 seconds is more appropriate. Two minutes is my preferred choice.

I am now seeing some of the same problems I saw last summer again, now that you removed the ability to defeat the JS parts of the site:

- The scroll arrows don't auto-repeat when you hold the mouse button down. You have to click the mouse repeatedly to scroll.

- The insertion point disappears from the quick reply box again.

- The ads are using 100 percent of the CPU time again.

- Occasionally I don't get the new page back after posting. It times out.

Instructions (assuming you're still using Firefox):

1. Go to https://addons.mozilla.org/en-US/firefox/addon/10 and hit Add to Firefox.
2. Proceed through the installation, and finish up by restarting Firefox.
3. Navigate to the forum index, and click on the Adblock text in the bottom right-hand corner.
4. In "New filter" add the following url:
http://www.daniweb.com/forums/clientscript/jquery.tooltip.min.js
5. Hit "OK", refresh the page. Notice that there are no more tooltips.

No, don't do that. It will leave JavaScript errors all over the page. Instead, edit your hosts file to block www.daniweb.com/scripts/style.php. That will block all JavaScript-enhanced style elements on DaniWeb - the dropdown navigation menu, the tooltips, etc.

The delay is about a quarter of a second - too short. 5 seconds is more appropriate. Two minutes is my preferred choice.

> 95% of DaniWeb users don't spend two minutes browsing DaniWeb per day, nevermind two minutes to wait for a hover! :) The hover time is the same as the amount of time the browser takes by default to show it's built-in tooltips feature. The only difference is ours are styled.

I am now seeing some of the same problems I saw last summer again, now that you removed the ability to defeat the JS parts of the site:

- The scroll arrows don't auto-repeat when you hold the mouse button down. You have to click the mouse repeatedly to scroll.

> I have absolutely NO idea why this would be caused by the JS?

- The insertion point disappears from the quick reply box again.
> Huh?

- The ads are using 100 percent of the CPU time again.

> Our feature that disabled JavaScript did not disable anything advertising related. This might just be a coincidence that a new ad campaign launched and it's a hog.

- Occasionally I don't get the new page back after posting. It times out.

> Not sure what you mean here.

I went ahead and increased the delay from a quarter of a second to a half second for the tooltips. Five seconds is silly - no one hovers over a link for 5 seconds before clicking on it.

No, don't do that. It will leave JavaScript errors all over the page. Instead, edit your hosts file to block www.daniweb.com/scripts/style.php. That will block all JavaScript-enhanced style elements on DaniWeb - the dropdown navigation menu, the tooltips, etc.

Where is this hosts file? I have Firefox.

The delay is about a quarter of a second - too short. 5 seconds is more appropriate. Two minutes is my preferred choice.

> 95% of DaniWeb users don't spend two minutes browsing DaniWeb per day, nevermind two minutes to wait for a hover! :) The hover time is the same as the amount of time the browser takes by default to show it's built-in tooltips feature. The only difference is ours are styled.

I was being sarcastic on the 2 minutes. But your site makes the tip appear almost immediately. The standard tip takes 2 seconds on FF.

I am now seeing some of the same problems I saw last summer again, now that you removed the ability to defeat the JS parts of the site:

- The scroll arrows don't auto-repeat when you hold the mouse button down. You have to click the mouse repeatedly to scroll.

> I have absolutely NO idea why this would be caused by the JS?

- The insertion point disappears from the quick reply box again.
> Huh?

I reported this last year. But see below.

- The ads are using 100 percent of the CPU time again.

> Our feature that disabled JavaScript did not disable anything advertising related. This might just be a coincidence that a new ad campaign launched and it's a hog.

I have since determined that the scroll problem, the disappearing cursor, and the 100% CPU are the same thing - the ad-hog stealing cycles.

- Occasionally I don't get the new page back after posting. It times out.

> Not sure what you mean here.

When I post, the reply that the page has been posted never comes. The loading-whizzer keeps spinning, until I get a "The host is not responding" error. So I don't know if the post has gone through. So I post it again (If I check first, I lose the post text from the posting window), and sometimes end up with two posts.

I went ahead and increased the delay from a quarter of a second to a half second for the tooltips. Five seconds is silly - no one hovers over a link for 5 seconds before clicking on it.

Because of my low-level dyslexia, I use the mouse pointer to follow my reading, so I don't lose my place or repeat lines. The tips prevent that, by covering the text I'm trying to read. That share box does the same thing in the original post of each topic.

>Where is this hosts file? I have Firefox.
Windows (like most operating systems) has a host file which can be used for internal DNS, however, this can only be used to block entire domains (it's usually accomplished by redirecting a domain to the loopback device). You can use the Adblock extension for Firefox (not Adblock Plus), it doesn't interfere with anything, and adding the filter is quite simple.

> But your site makes the tip appear almost immediately. The standard tip takes 2 seconds on FF.

2 seconds? Do you have proof of this? The default time for Windows tooltips is 400 ms and is a setting in the registry. It affects all Windows-based apps including the Start Menu, Explorer, Internet Explorer, etc. For FireFox to have a different setting, I guess they don't use the Windows-based tooltips but instead their own application-specific ones? Our tooltips used to be 250 ms and we just upped it to 500 ms, to make it on par with the Windows default.

> When I post, the reply that the page has been posted never comes. The loading-whizzer keeps spinning, until I get a "The host is not responding" error. So I don't know if the post has gone through. So I post it again (If I check first, I lose the post text from the posting window), and sometimes end up with two posts.

This used to happen to me every so often (like once a week). The post ALWAYS went through, so I would just refresh the page and the post would show up. If you're afraid it won't, just copy your post to the clipboard before refreshing. This isn't something that happens quite often though, right?

> Because of my low-level dyslexia, I use the mouse pointer to follow my reading, so I don't lose my place or repeat lines. The tips prevent that, by covering the text I'm trying to read. That share box does the same thing in the original post of each topic.

Is it possible for you to move your mouse pointer either over or directly below the line you're trying to follow? The tooltips never cover up any of the line that is initiating them.

> I have since determined that the scroll problem, the disappearing cursor, and the 100% CPU are the same thing - the ad-hog stealing cycles.

I'm not sure why you're experiencing these, but since they're ad-related, this has nothing at all to do with whether JavaScript features are enabled or disabled, as the ads load the same either way.

Oh, also, in response to an IM with tgreer, you can't use the Adblock extension for FireFox to block the /scripts/style.php file because it only lets you disable javascript files that have a .js extension. You will have to use the [search]hosts file[/search], where you reroute http://www.daniweb.com/scripts/style.php and http://www.daniweb.com/scripts/menu.php to localhost. Disabling these two files is the only way to block the menu dropdown and the tooltips without any side effects or JavaScript errors on the page.

2 seconds? Do you have proof of this? The default time for Windows tooltips is 400 ms and is a setting in the registry

many people/system tuners change this to make the start menu pop up quicker

That's why I said "the default time" :) But the start menu popup speed and tooltip speed are two different settings.

>you can't use the Adblock extension for FireFox to block the /scripts/style.php file because it
>only lets you disable javascript files that have a .js extension.

Huh? I block .php files all the time with the Adblock extension. And just to test it now, I blocked both style.php and menu.php, and the drop-down menus and tooltips don't appear anymore.

That's weird. tgreer said it wouldn't work.

Screenie:

Don't listen to tgreer. He doesn't post here anymore, anyway.

> But your site makes the tip appear almost immediately. The standard tip takes 2 seconds on FF.

2 seconds? Do you have proof of this? The default time for Windows tooltips is 400 ms and is a setting in the registry. It affects all Windows-based apps including the Start Menu, Explorer, Internet Explorer, etc. For FireFox to have a different setting, I guess they don't use the Windows-based tooltips but instead their own application-specific ones? Our tooltips used to be 250 ms and we just upped it to 500 ms, to make it on par with the Windows default.

I don't really know how to prove it, but I put a digital clock next to the screen. But human reaction time is .35 to .85 seconds, so I can't get it any closer. I am seeing three different times on automatic displays on these pages:

- A period too short to measure on the dropdown menus.
- about half a second on the DaniWeb tooltips.
- About 1.5 seconds on the Windows screen tips (e.g. on the DaniWeb link in the upper left corner).

Another difference is that the Daniweb tooltip takes time (about 1/2 second) to completely appear.

I want you to imagine the following:

A website loads a full screen if information. Then a tooltip appears, and immediately the rest of the screen clears. Then the information loads again. And every time a tooltip appears or disappears, this same thing happens again.

I know the actual screen doesn't do that, but that is what happens to the text image in my visual cortex.

> When I post, the reply that the page has been posted never comes. The loading-whizzer keeps spinning, until I get a "The host is not responding" error. So I don't know if the post has gone through. So I post it again (If I check first, I lose the post text from the posting window), and sometimes end up with two posts.

This used to happen to me every so often (like once a week). The post ALWAYS went through, so I would just refresh the page and the post would show up. If you're afraid it won't, just copy your post to the clipboard before refreshing. This isn't something that happens quite often though, right?

In my case, the post went through about 3/4 of the time. It is now happening about once a week. It seems to coincide with the page delays because an ad loads late.

> Because of my low-level dyslexia, I use the mouse pointer to follow my reading, so I don't lose my place or repeat lines. The tips prevent that, by covering the text I'm trying to read. That share box does the same thing in the original post of each topic.

Is it possible for you to move your mouse pointer either over or directly below the line you're trying to follow? The tooltips never cover up any of the line that is initiating them.

I'm doing something like that, but it takes longer.

> I have since determined that the scroll problem, the disappearing cursor, and the 100% CPU are the same thing - the ad-hog stealing cycles.

I'm not sure why you're experiencing these, but since they're ad-related, this has nothing at all to do with whether JavaScript features are enabled or disabled, as the ads load the same either way.

Originally you said the rounded corners script was causing the scroll and disappearing insertion point troubles, and disabling JavaScript cured that. Now I think they are ad-related. They seem to come and go with the activity of the various ads.

> Originally you said the rounded corners script was causing the scroll and disappearing insertion point troubles, and disabling JavaScript cured that.

That was when we were using this fancy JavaScript to create the rounded corner effect, which was having a bunch of unforseen side effects. We don't use that JS anymore. It was causing all different side effects on different computers so everything strange going on, I blamed on it.

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.