Avoid Awesome Screenshot

I was getting some pretty bad web performance, with a little exploration I learned it was a Safari Extension that was doing things I did not like.

While doing some web page debugging, I noticed that a simple, static, html file was pulling in a ton of web resource. Most noticeably from a place called Superfish, and sucking in with it a good deal of JavaScript libraries. On. Every. Page. Load.

The culprit seems to be a Safari Extension called Awesome Screen Show 1.3.7 by Dilgo. However, the developer site isn’t coming up, and I’m not all that encouraged by what I see over at Superfish either.

Uninstall the extension, as here’s the overhead you’ll be saving:

Firefox got real slow

One day Firefox just came to a crawl when running web pages with JavaScript. Then I found out what was causing it and how to fix it. Here’s how.

I was using the Firefox 3.6.16 web browser and it got really slow.  Unbearably so.

When I went to look at the console, it was filled with all kinds detailed of JavaScript warnings, the kind one might expect out of JSLint.  It was spending so much time checking the JavaScript code that it was barely spending time executing it.

The “culprit” was the Web Developer add-on.

Normally, the Disable / Disable JavaScript / Strict Warnings menu item is checked.  Unchecking it gives some fantastic diagnostic messages when writing code.  Forget to re-check it and regular web usage may come to a crawl.

Aside from the console being a clue, you may also see a caution sign or a red circle with a white ‘x’ in it on the Web Developer toolbar.

For normal speeds when regularly browsing, just disable strict checking.

Thick Menu Separators in ExtJS

Do your menu separators on Ext web applications suddenly appear as thick bars instead of thin lines? Here’s how to fix it.

I ran across a problem in Firefox 3.6.16 where my JavaScript applications produced with ExtJS were producing menu separators that were extra thick.

Even Ext demo pages did this: Menu Separator

Here’s how I solved it.

The problem can be addressed with the Web Developer add on.

Normally its Disable / Disable Minimum Font Size is checked. If it gets unchecked, Ext behaves very badly.

Check it and then reload the page; menu separators will be back to normal.

Safari Problems Downloading .DMG Files

A number of users are reporting that Safari 4 is no longer downloading .dmg files. Here’s how I fixed the problem when it started happening to me.

A while back I started having problems with Safari 4 being able to download files. Normally when one clicks on a .dmg or .zip file, Safari downloads it.

Recently, it stopped working, either doing absolutely nothing or trying to load the file into the browser itself for display. It was as if the MIME type wasn’t properly being handled.

Here’s how I fixed it.

It appears that Speed Download‘s broswer plugin is to blame. While it works amazingly well with Safari 3, it doesn’t seem to work quite right with Safari 4.0.3.

  1. Quit completely out of Safari.
  2. Go to /Library/Internet Plug-Ins directory and locate the file SpeedDownload Browser Plugin.plugin and move it out of that folder.
  3. Restart Safari.

ModRewrite Woes (Solved!)

Problems with ModRewrite, relative URLs, base paths, things executing without extensions being specified, and using MultiViews — read on.

While working on a project, I stumbled into some of the weirdest Apache2 mod_rewrite problems that I’d ever seen.

The goal was to make a URL like http//www.nowhere.com/item/1234 turn into http://www.nowhere.com/item.php?id=1234. Trivial, and I’ve done it all the time.

RewriteEngine on
RewriteRule ^item/(.+)$ item.php?id=$1 [L]

This time it wasn’t working the way I expected. When I used the human-readable version, my page got delivered by I had no images, no css, no javascript. Yet, if I used the computer-friendly long form with parameters, it worked just fine.

A little examination with Safari’s activity window showed me that in the initial case the browsers were looking at all relative URLs as if they were prefixed with /item/. This make sense, because the URL redirect knows how to play rewrite games with the rules to get to my page, but the relative links on those pages, to css, graphics, and js, had no clue this was a fake base url.

Many thanks to richardk who pointed out multiple solutions back in 2005.

  • Don’t use /, and there isn’t a problem.
  • Use absolute paths, though you have to edit all the links on your page; if using PHP, consider a variable for the base path.
  • Use a RewriteRule to hack off the offensive directory that doesn’t exist.
  • Or, use the <BASE …> tag.

Well, that rendered the page prettier, but I realized my argument wasn’t being passed in. Yet, the re-write rule was correct.

So I tried http//www.nowhere.com/item, which should not have matched and should not have brought up a page. Yet it did.

A little experimentation showed that any page that had a known extension was getting delivered.

What this meant was that the moment the browser saw /item it found the item.php page and delivered it without ever going through Apache’s rewrite module, and hence no parameters.

Luckily, I’ve encountered this symptom before in a different context. The offender: MultiViews. This is the bugger that deals with multiple language support; you know, where you have a zillion internationalized instances based on filename extensions….

Turning that off instantly solved the problem of delivering a file without an extension:
# Options Indexes FollowSymLinks MultiViews
Options Indexes FollowSymLinks

That also meant that the mod-rewrite rules worked. And that meant the parameters were passed correctly. And that meant I was was happy, because the code was working.

Firefox Slow Page Load – Solved

Firefox 3 slow? 20 second page load times? Figured out why. And how to fix it.

A co-worker showed me an interesting problem with Firefox today. He loaded a page from our application (running on localhost) and the page content loaded instantly, but the page load itself didn’t end until a time out 20 seconds later. Literally.

Everything we saw a measured from the browser or from the sending application showed that the content was sent in milliseconds, and the page load was just sitting there doing nothing. We were even using the latest Firefox beta.

Other browsers had no such problem.

Turns out, we figured out what was going on using the Tamper Data add-on.

Turns out there was a Connection: keep-alive in the header. When we changed it from keep-alive to close, the browser behaved as expected. That is, it loaded the page instantly.

A little web investigation showed that when you use the keep-alive attribute, you must also use Content-Length: header, which the sending application wasn’t doing.

A quick application tweak to send the content length, and everything ran super spiffy.

Now, if you don’t have access to the application that’s sending you web pages, you can twiddle with the about:config and change the network.http.keep-alive setting to false.

Apple’s Top Secret Feature?

Could Apple’s release of Safari for Windows actually be a hint to one of the Top Secret Features in the forthcoming OS X?

According to WebWare, Apple is releasing its browser, Safari, for the Windows platform.

The initial question from the community is: Why? (Though this may be the wrong question..!)

Clearly the region of the browser application space has been filled by Internet Explorer, Firefox, Opera, and a handful of others.

Wouldn’t releasing Safari simply make the Windows environment more compelling to stay? This got me thinking…

What if multi-platform Safari wasn’t the point at all, but it was actually a proof of concept of something greater?

A while back, Apple made the stunning announcement that it had been secretly working on a way to take the same source code and produce a PowerPC version and a Intel (Mac) version, and have them look identical. Combined together, they make the Universal Binary, which is a program that can be run on either system architecture. This was no small feat of clever engineering.

What if the Top Secret feature is that they’ve added Windows as a target for the same source code? Already RealBASIC is doing it, but that’s BASIC, not the mixed language richness of XCode.

As a developer, if I can use Apple’s amazing environment to produce Windows code, I’m all for it.

As a business owner, if I can produce applications and have them work on Apple’s customers as well, I’m all for the additional marketspace.

And, …if I’m a home user… if I’m wanting to switch to Mac, but I’m tied to the Windows platform because of application lock-in, this is a breath of freedom if my applications and data work elsewhere.

Could it be that Apple has taken Safari and simply “recompiled” it? That this is merely the test run to give applications independence of Windows, allowing users to switch over to a kinder, friendlier environment?

I’d like to think so.