Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Speed up Safari page load times by disabling JavaScript Web Browsers
I noticed that if you disable Javascript in Safari (on the Security panel in the Preferences), it will load pages much faster. There is quite big difference even with my 512kbps cable connection. Of course, when pages contain some Javascript applications or links, they won`t work. Also, if you have saved some Javascript as a bookmark (mail URL or window rezise, for example), those won`t work. So for these kinds of pages, you need to enable Javascript again.

[robg adds: After this weekend's work on the G5 review, I'm all benchmarked out, so I haven't tested this one much -- I tried a couple of pages with it set both ways, and may have noticed a small speed increase, but I'm not sure ... so I thought I'd throw it out for general conversation.]
    •    
  • Currently 1.67 / 5
  You rated: 3 / 5 (3 votes cast)
 
[29,340 views]  

Speed up Safari page load times by disabling JavaScript | 17 comments | Create New Account
Click here to return to the 'Speed up Safari page load times by disabling JavaScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Speed up Safari page load times by disabling JavaScript
Authored by: VEGx on Oct 13, '03 11:13:37AM
Wow, it did speed up after I disabled both Java and Java script.

Now I need to figure out if there are pages were I actually need Java (script) to be enabled...

[ Reply to This | # ]

Speed up Safari page load times by disabling JavaScript
Authored by: VEGx on Oct 13, '03 11:16:16AM

And the answer is http://www.apple.com and the Panther counter is gone!!! I'm gonna miss it :-P



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: gklinger on Oct 13, '03 12:49:12PM

It's odd. Disabling Java and Javascript does improve the speed at which pages load but without them, some pages don't work, look or render correctly. On the other hand, I've noticed that several pages that don't work properly with Java and/or Javascript enabled now work perfectly. I can't figure it out.

I wish it was possible to specifiy settings for each individual bookmark. I would like to have Java/Javascript activated for sites that need it and disabled for all other sites. Besides slowing things down, it introduces possible security holes.



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: dr_turgeon on Oct 13, '03 08:47:15PM

Could you be more specific about these security holes?



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: nickfitz on Oct 14, '03 10:26:15AM

I think it's fairer to say that JavaScript has been used to exploit certain Windows security vulnerabilities, which aren't relevant to OS X. Furthermore, such exploits are predominantly related to Outlook Express and scripts in HTML email (although Internet Explorer has some unpatched vulnerabilities).

Unless you're running Netscape 3/IE for Windows, you don't really have to worry about JavaScript from a security perspective. A lot of so-called vulnerabilities are actually spoofs dreamed up by idiots to confuse the unwary. Real vulnerabilities are unlikely to work on Safari anyway. They normally only affect one version of one browser, and it tends to be IE.



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: landis on Oct 13, '03 11:42:01AM

Disabling JavaScript may not be a good idea for those interested in multimedia viewing.

In the near future (early 2004) Microsoft will be changing their browsers to send out a warning dialog box every time a page contains an EMBED, OBJECT, or APPLET tag.

The proposed solution by Apple and others is to render these tags with JavaScript. So now, if you have JavaScript off you will no longer be able to view Quicktime Movies, VR, hear QT sound, among many others.

Something to keep in mind.

For more info see:
http://developer.apple.com/internet/ieembedprep.html



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: schaps on Oct 13, '03 12:28:35PM

I have been dealing with this for months-- one of my local newspapers, StarTribune.com, does not work well with Safari, and I have traced it to something with Javascript - if I switch off Javascript, the pages may look different but load fine.

Others who have tested it briefly said it loads fine, but I think the problem comes when you become a (free) registered user, which sets a cookie, because if I delete all the "startribune.com" and "www.startribune.com" cookies, the site runs OK again until I login (which is required to read any of their articles). It then progressively slows to a crawl, with page loads taking 30 seconds or more of spinning beach ball. Again, though, turning off Javascript results in instant quick surfing.

I have bug-reported this many times, but unless a tester spends a bit of time surfing around and does the free registration, they will not notice it.

And of course, since it only seems to affect Safari, Startribune.com doesn't give a rip.

T



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: nickfitz on Oct 14, '03 10:53:57AM

FWIW, one of the problems is probably

http://www.startribune.com/style/scripts/s_code.js
which does an inordinate amount of string manipulation for the apparent purpose of link tracking. On story pages,
http://www.startribune.com/style/style_exceptions.js
is used to write out a CSS stylesheet in a way that accounts for different browsers, which is probably a bit of a performance killer.

IMHO, those pages are using lots of JavaScript to do stuff that could be done more efficiently on the server.



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: Handycam on Oct 13, '03 12:40:43PM

Yeah, and I'll bet you can save a few more seconds by running in 256 colors! ;-)

Seriously, most everything on the web relies heavily on Javascript, so if you disable it you can surf faster (perhaps) but miss out on a great deal of functionality. To each their own, i suppose.

I agree about Java, I always disable it, on any platform I've used. It's not as widely used, so I don't really care.

If you want to surf to plain-vanilla sites with real spped, try using Lynx in the Terminal. If it's a site wherein images aren't important, this is wicked fast.



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: dr_turgeon on Oct 13, '03 08:43:16PM
Agreed.
HTML is lifeless without JavaScript. This page included.
Just press command-option-V to see! Most web pages and XML have functionality that depends on manipulating elements in the DOM (document object model). This is the whole point of JavaScript--to make pages dynamic.
Use the bug button if it isn't working the way you think it should.

Better for Apple to fix the slowdown than to ignore a great chunk of web functionality!

[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: mistercow on Oct 14, '03 10:34:10PM

Actually, 256 colors slows you down in OS X. It seems to be much better optimized for 16-32 bit color.

Yeah, I know. You are just trying to make the point that it isn't worth the sacrifice. Still, an interesting thing to notice.



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: idji on Oct 13, '03 09:51:16PM

It does speed Safari a little for me, but disabling JavaScript also helps to see sites better. For example, a French sports site, RDS.ca, does not render the articles properly on the front page. Disabling JavaScript makes the articles appear. So it's either bad coding on this site or some bug with JavaScript in Safari.

Another bug I have with Safari is when I send my password on a form for my online banking site. If I hit Enter, the site tells me that I clicked twice on the Submit button! This can be dangerous if you order something from a Web store. So now I click myself any Submit button I see.

I still consider Safari a "developmental" browser, even if I use it 99% of the time. I hope version 1.1 improves browsing sites.



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: benixau on Oct 15, '03 08:03:33AM

Hopefully Apple will let us specify websites in the preferences which are loaded with opposite java/jscript settings to the main browser.
i.e. if you select to enable it then it is a list of disabled websites and if you disable it then it becomes a list of enabled websites.
this would be useful for speed and security.



[ Reply to This | # ]
Speed up Safari by disabling JavaScript - AppleScript Needed
Authored by: charles2003 on Oct 17, '03 02:35:48AM

What would be nice is for someone to write an AppleScript to would toggle JavaScript on and off. Is there any AppleScript wizard who reads this website who would like to submit such a script?

Of course, what would be nicer is for Apple to put the option of putting such a toggle on the "button bar." (...like you can add the font size changer.)



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: jhonny on Mar 30, '04 12:11:28PM
Great tip! I noticed HUGE speed improvements on many sites after disabling JavaScript. One really good example site is IGN. Try opening a few of their sections to tabs at the same time (mac, ps2, xbox, cube, pc). With JavaScript enabled opening those five tabs takes me about 40 seconds and Safari freezes during the load (you cannot switch between tabs etc). With JavaScript disabled those tabs load in about 10 seconds and you can switch between them while loading... I wonder if this is a JavaScript bug on Safari or terrible code from IGN.

[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: Cameroon on Mar 31, '04 06:45:08PM

Actually, JavaScript does introduce security concerns even on non-Windows machines.

One of the most common is stealing cookies by inserting malicious javascript into URLs. See http://www.securityfocus.com/ if you want to look for specific examples.

While it may be that JavaScript on a Windows machine has more potential for compromises, it's not limited to Windows only.



[ Reply to This | # ]
Speed up Safari page load times by disabling JavaScript
Authored by: sethd on May 12, '06 11:18:44PM
You can turn off javascript and re-enable it for certain sites only (like a whitelist) easily with SafariStand (Mac OS X Hints post about it). This is a great way to get a general speed boost but still have javascript for the sites you need.

---
fictionalpeople.com sethpost.blogspot.com

[ Reply to This | # ]