disabling Javascript - what effect?

As part of my on-going attempts to improve the slowness of Safari, the best fixes seem to center around Java (e.g. emptying Java caches) which I've read about and posted about elsewhere. In a similar situation, others have said they've disabled Javascript in Safari so I'm trying that now.

I did a bit of searching but I just don't get this so here's my basic question. I was wondering what effect that would have? Does someone know of a website where I could go and easily see the difference in functionality with javascript enabled and disabled?

(As for the effect on the speed of Safari - disabling javascript seems to help though the memory leak is still high).

thanks.

Posted on Sep 7, 2005 2:20 AM

Reply
20 replies

Sep 13, 2005 1:43 AM in response to Fran Corpier

Hi Fran,

Apologies for the delay in response.

* Yes, I do indeed use some dashboard widgets occasionally - (although I've only really started playing with it and installing new ones in recent weeks - way to soon to have been responsible for this problem which has been with me for a long time).

* No flash thingy or other internet querying app (traffic drops to a constant nil if Safari left idle, apart from Mail.app checking for mail periodically)

* That's a tricky one because although there is my established core sites (of which Apple Discussions is a major one) the rest change every day during normal browsing and as I'm sure you'll appreciate, there are a lot of sites out there!

The 'closure' technique is completely unfamiliar to me (as is any javascript really) and is worthy of consideration if you think it is. I'll have a look at the link you posted to get up to speed.

Sep 13, 2005 5:45 AM in response to JNK

Hi, I am new to a Mac and 2 weeks ago got a very fast G5. What has been extremely dissapointing has been the slowness of Safari. I hate to say this, but a big reason from getting this computer was because my 4 yr old Dell PC, with all the antivirus/antispyware/etc software sometimes would block some webpages. However, this old computer running IE loads up webpages faster than the G5. Can somebody help? Sometimes the page loads up, however, and this is random, the blue bar goes part way up in the url bar and it waits sometimes for many minutes. We shut down safari several times per day as other users get on the computer. I got a 3mb cable line. I do have widgets. This is random, sometimes it works ok and other times on the same sites it waits minutes.
Thanks so much

Sep 13, 2005 8:48 AM in response to CloitusDisruptus

Thanks for the response, "CD"; of course, I'm fishing, to see if I can catch a lead.

The only times I get the spinning beach ball on Safari are:
[1] if I have iDisk open (WebDAV, I believe, slows everything else down); or
[2] if some php script (including my own test scripts) include a sleep loop; because Safari waits and waits for that loop to exit, despite a flush-- or it used to. (I haven't tested these scripts in quite a while); or
[3] a site might seem not to load if their JavaScript is old and/or Internet-Explorer-specific. In this case switching the UserAgent in the DeBug menu to MSIE 6 would help.

Safari, since a number of updates ago, will wait up to 1 year (!!) before giving a timeout, while waiting for a site to load. It used to give a message after 60 seconds. I think this might be the cause of some of the spinning beach balls, but not necessarily all described here.

For example, "JNK" talked about the long wait, before switching the User Agent (User Agent header, actually) to MSIE 6, when he got right in without disabling JavaScript. That is surely a case of the JavaScript on the site being IE-specific, which would cause Safari to wait and wait and wait.

The User Agent switch otherwise does not affect the way Safari renders a page. But it can help you get past some ineptly coded script. In this case, it's a good idea to write to the contact email on the site, and let them know that their script is "antiquated" and a few minor changes would allow more people with "modern browsers" to enjoy their site.

P.S. I haven't forgotten about posting my Speed Test for any web page, yet. Soon...soon. 🙂

Sep 16, 2005 2:26 AM in response to JNK

Hello CD and Fran

CD -

I'm not having the same results as you but that could be because of various other issues with my iMac and general matters of trying to tune it up and upgrade to Tiger. Clearing the java caches remains the single most effective fix but as the memory leak approaches 200MB which it can within about 6 hours of leaving Safari open (a few windows, to these Discussion pages), then the system starts to slow down and may become quirky (I say may because I haven't logged this yet and because it could be due to other issues and maintenance I've been doing with the iMac.) So at least for me, this memory leak may still be part of the problem? I don't know.

I went back to enabling javascript because again aforementioned work with my iMac has me going to Apple Support and other similar pages often and I don't want to get sidetracked by another javascript not enabled problem (as per the other post!).

I'm not sure if Fran has had a chance to find and post the script for testing Safari's speed in the moment.

There are times when pages load faster if I switch to MSIE 6.0 in the Debug menu. Fran - it's not because of cached pages because I've had many instances where this has happened immediately after clearing caches from within Safari and even after using cache clearing from various cleaning utilities.

P.S. CD -
I tried to look at the Webkits issue you and Eme referred to but I couldn't figure it out.

Sep 19, 2005 9:15 AM in response to JNK

Hi JNK,

You know, I probably am having the same results as you - I've stopped the dreaded slow-down but it's not super quick all the time; there's the occasional glitch here and there as, I guess, it accesses caches, swapped pages, etc, I bet it's similar to yours. It's just that it's now completely useable whereas before it was completely unusable.

You're right about the three weeks, my uptime is now 24 days 1 hour and I'm still running that same instance of Safari! It doesn't affect the rest of the operating system though or any other apps, only Safari - (that's just in case there was any confusion about this - ignore it if not).

Here's some memory usage data in case it's of interest:

After 24 days of continuous running and moderate to heavy use, Safari's currently using 701.45 MB of real memory and 1.34 GB of virtual memory. That's an awful lot, and it's by far the biggest consumer of memory: next down is 'kernel_task' followed by 'WindowServer' which are both fundamental components of the system, and they're both using a fraction of Safari's, so I tend to agree with you; I doubt it should be anywhere near that high.

'Leaks' is now reporting:
<pre><small> Process 206: 4411283 nodes malloced for 641205 KB
Process 206: 79209 leaks for 3298272 total leaked bytes.
</small></pre>
However, none of this excessive memory use is bringing back "The Problem", so that's why I'm thinking they must be largely unrelated.

(I see in the other thread that you've discovered virtual memory - don't worry about it at all, it's not unusual and is a sophisticated system for managing the memory dished out to apps and is fundamental to the experience of a modern OS like OSX - more info here if you're interested)

hehe, I'm gonna have to quit Safari soon... but I might just wait until it dies. There's a couple of updates that need installing (I don't know how they affect the situation, but I think it's only fair to have the latest updates...). For interest, I'll also try your other suggestions at some point (after Safari dies...)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

disabling Javascript - what effect?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.