From time to time I have been known to dabble in a little web development. For those of you who do not know how the process works, you basically sit down in a text editor and start writing out code, that code is saved to a server and you load the result in a browser. At that point, Magic Stuff™ happens and your code is translated into html for display in a browser.
This workflow amounts to a lot of reloading pages in your browser. Often is the case where my mind is just not working and I will have reloaded a page hundreds of times after making minor tweaks to the logic in my code. This used to be a pretty painless process, at least up until the latest version of Safari (1.3) surfaced.
The keyboard sequence “Command-R” sends a “Reload Page” command to Safari. This used to happen in milliseconds, it now takes significantly longer. If I watch the “Activity” monitor in Safari, I can see a simple reload is re-requesting all the images that are on the page. Safari has always been a little boogered in regards to caching images, as of late, it seems to simply assume you want all new graphics on a reload command. I am pushing 3 seconds on a dual 2.0Ghz G5 just to reload a page with only three or four images on it. I have however, found a few very strange workarounds.
Workaround number one is to put on the page a html link to the very same page you are working on. This reloads the page just fine, and I am back to normal millisecond reload times. The bummer about it is that I have to move my hand to the mouse in order to hit this link, which takes a second or so, then I have to move back to my editor. All in all, it is just about a wash.
The second workaround is to “Command-L” to select the url in safari, then press “Return”, which saves me the trip to the mouse, and is my new preferred method. it still takes longer, but not as long as mousing to a link on the page to reload it. Safari never used to do this, it is only as of this last Safari update that this happens. Camino and FireFox do not seem to be afflicted by this at all. I am half tempted to just use a different browser, but alas, Safari is just so much more polished than the rest.
What throws me off about this new aggressive image reloading is that even with it, images still fail to refresh. If you call a image that does not exist on the server, you will get a icon in Safari where the image was, and as expected, the images will not have loaded. If you now upload the image to your server, hit reload, you would expect the image to show up, but it does not. You can even open the image in a new window and reload multiple times, clear your cache, nothing seems to be able to bring that image back to life. Occasionally, quitting safari will do the trick, I just feel that is not an acceptable way to get a image that indeed exists to load.
Try explaining this to friends tryying to learn GoLive or DreamWeaver and you are screwed. Invariably, the will link an image with a path to file:///Users/them/Desktop/shirt.jpg and get stuck in this image will never load loop.
The only way I have found to resurrect a broken image that has been uploaded is to open a direct link to it in another browser. it will still show as missing on first load, but a reload, or in some browsers, a “Super Reload” will make the image show up. Where it gets totally foobar’d is somehow, that now allows Safari to load the image as well. How two totally separate browsers with totally separate cache systems can interconnect, is beyond me, but this is certainly maddening and needs to be resolved. I even have gone as far as to make Safari’s cache directory non writable, still no love.
I have held onto a little secret about Safari for ages now, not really knowing who to tell, or if I should. Safari is a mini DDoS attack tool. I reported my findings on this to Apple on three occasions. I do not have special access to special channels, so all I can do is use the feedback tools on Apple’s site. At any rate, with little effort, I can spawn hundreds upon hundreds of http processes and database connections to any website. You won’t go taking google.com out, but you can certainly cause troubles for the smaller sites. Actually, with as bad as it is, you can cause trouble with the larger sites as well. It trivially simple, if anyone is reading this and knows of a proper report channel, I would love to demo it to someone who can fix it. It’s just really bad mojo to have a server stress tester built into Safari. :-)
To the credit of those who make Safari what it is, there is a new contextual menu that I have been wanting for ages now. You can finally control click an image, whether that image be a dead 404′d image, or a active one, and open it in a new window. This is handy for the times when Safari just refuses to update an image you know you have replaced. You can use this trick to isolate the image in a new window and reload it a few times. Not that it always works, but it is nice to have.
Another handy addition is a contextual menu to “View Frame Source”. I make a ton of administrative interfaaces, try as I might, frames are still a very good way to present forms to a client to manage databases and such. You used to have to take a two step approach to this, “open frame in new window” and then “view source”. This is a welcome addition as well.
All in all, this new version of Safari is much faster, I would say on the order of 30% or so, it just feels a hell of a lot better than it used to. Some complex JavaScript stuff I use works significantly faster as well.
None of what I am griping about will hit most users, if you develop web apps, you will curse Safari all day long. Maybe with more and more developers refreshing pages while working on Dashboard widgets, this will get proper attention. I am not sure it will affect local development or not. If you are in the know, which I am not, pass the link to this post on, I am more than happy to write a proper detailed bug report on these issues.
No Comments so far
Leave a comment
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>