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

Remove Safari history files on logout via shell script Web Browsers
If you'd like to remove your Safari history files when you log out, first create the following shell script:
#!/bin/bash

# Point this at your user folder.
useroot=/Users/your_user

# Clear Safari History (except for bookmarks).
rm -f $useroot/Library/Safari/Downloads.plist $useroot/Library/Safari/History.plist 
rm -f $useroot/Library/Safari/HistoryIndex.sk $useroot/Library/Safari/TopSites.plist 
rm -f $useroot/Library/Safari/WebpageIcons.db $useroot/Library/Safari/LastSession.plist

# Add any additional clean-up here.
Save the script somewhere, make it executable, and because it runs as root, make sure it is protected from modification. Then copy and paste this command into Terminal, modifying it to point to wherever you put the above script:

sudo defaults write com.apple.loginwindow LogoutHook "/Users/your_user/scripts/privacy.sh"

To be complete, you should also visit Safari's Preferences, open the AutoFill tab, and clear all of the checkmarks (Safari then won't remember passwords and forms).

[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (14)  
  • Currently 1.38 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
 
[14,654 views] Email Article To a Friend View Printable Version
Create a Reload button on Safari 4's bookmarks bar Web Browsers
One thing I hate about Safari 4 is the relocation of the reload button to the right side of the URL entry area. Sure, you can still use Command-R , but for those who prefer navigating with their mouse alone, here's a cool tip to somewhat solve your problem!

So, drag any of the buttons from my post to the far left of your bookmarks bar, and you've got a simple JavaScript reload button, just half an inch away from where the old one used to be! I've even been nice enough to create different designs using the "Special Characters..." dialog box in all Cocoa applications.

The simple javascript is:
javascript:location.reload(true)
I made them into buttons using some special characters like these: ⤶  ⌘ ⏎ ⎋
  Post a comment  •  Comments (10)  
  • Currently 1.14 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[10,157 views] Email Article To a Friend View Printable Version
Solve an apparent 'stuck Safari' crash without losing work Web Browsers
Yes, I know, if you use haxies you get what you deserve. But to this day, Spotlight, enhanced custom keystrokes and all, and in spite of my overall hatred for the mouse versus a good keystroke combo, there are just a ton of things I find easier to do with a right-click and Contextual Menu action when I am in certain work (or leisure) modes, especially Web research and just plain surfing. But the price is getting higher.

Summary of this hint: I was having a spinning beacbhall hang issue in Safari. After some work, I figured out that it was caused by FruitMenu's contextual menu support. Temporarily disabling the contextual menu support -- without quitting or logging out -- instantly ended the Safari hang-up and I was able to start using it again without losing any work.

Read on if you'd like more background on the Safari problems I was having, and how I diagnosed and solved them...
read more (581 words)   Post a comment  •  Comments (7)  
  • Currently 1.63 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (8 votes cast)
 
[9,946 views] Email Article To a Friend View Printable Version
Edit Safari's list of User Agents in the Develop menu Web Browsers
Do you find yourself constantly using the 'Other...' item in Safari's Develop » User Agent menu to simulate User Agents that aren't shown in the list? If so, it's easy to permanently add your own favorites by editing the UserAgents.plist file in the Resources directory of the bundle.

I recommend making a copy of Safari.app, then Control-click your copy and select Show Package Contents from the pop-up menu. Navigate into Resources and edit the file UserAgents.plist in any decent text editor to include your faves.

Simple, yet effective.
  Post a comment  •  Comments (3)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[6,697 views] Email Article To a Friend View Printable Version
One possible fix for Safari freezes and slowdowns Web Browsers
I am syncing, on several Macs and several user accounts, information such as Calender, Mail Rules, Bookmarks, etc. After recently updating to Safari 4.01 and OS X 10.5.7, all of a sudden I had all very bad Safari performance -- including constant freeze situations. After being ready to delete the impacted user, I realized that there were some issues with the database.sqlite3 file in the Library » PubSub » Database folder. The PubSub folder is used for tracking RSS feeds, and it seems my problem resided there.

After deleting the database.sqlite file, and reseting the Mobile Me information, the freezes and crashes stopped. Hope this helps others, too.
  Post a comment  •  Comments (11)  
  • Currently 2.55 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (11 votes cast)
 
[38,783 views] Email Article To a Friend View Printable Version
Easily add a site to Safari 4's Top Sites page Web Browsers
Grab the favicon (that tiny graphic right before the "http" in the url) and drag it to Safari 4's Top Sites button in the Bookmarks Bar. Alternatively, if you customize the Toolbar to show the Top Sites button, you get a larger target and it works the same way. This has to be the easiest way to get something into Top Sites.

As a test, I showed it to my Mom over Timbuktu and she got it right away. If it passes the Mom test, I think it's pretty good.
  Post a comment  •  Comments (3)  
  • Currently 2.56 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (9 votes cast)
 
[44,216 views] Email Article To a Friend View Printable Version
Bulk convert Safari's Web Archives to PDFs Web Browsers
I've been archiving web pages using Safari's one-file web archive format for a while. I was trying to figure out a bulk conversion method if I want to send these archives to Windows users, or switch to a different browser. It turns out that Scott Garner's Download URL as PDF Automator action can take web archive files from the Finder and will convert them to PDFs (in addition to its intended function of downloading pages off the web.)

Just download the Automator action, then create a workflow with Find Finder Items hunting through your home directory for files that have the extension webarchive. That action should feed into Scott's action, and you're all set. The action has some options, including whether or not the PDF should be split into pages.
  Post a comment  •  Comments (6)  
  • Currently 1.86 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[18,615 views] Email Article To a Friend View Printable Version
Mix Safari 4 Beta and Final to get tabs on top Web Browsers
Just a quick note to those who, like me, greatly miss the 'tabs in the title bar' feature of Safari 4 Beta in the final release of Safari:

After installing Safari 4.0 Final, I was quite disappointed to no longer have the 'tabs in title bar,' but I still had both the app and the installer from the last Safari 4 Public Beta (remember there were two main versions; the last one was published on May 12) on another disk, and I noticed that it launches just fine using all the underpinnings of the final version.

I'm sure it's not 100% compatible, but we all know that most of the meaningful components of Safari are *not* in the app itself. In fact, I'm using it right now to write this.

In short, you can install the final Safari 4.0, then use Pacifist to extract just the app from the Public Beta disk image. Better yet, if you still have the beta, rename it to something like Safari_beta.app, and you'll be able to use the tabs in the title bar again, as well as any of the customization tricks found here and elsewhere.

[robg adds: I haven't tested this one, as I no longer have the beta installer around. I also don't know what issues, if any, this may cause.]
  Post a comment  •  Comments (28)  
  • Currently 1.60 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (10 votes cast)
 
[21,346 views] Email Article To a Friend View Printable Version
Remove the Add Bookmark button from Safari 4 Web Browsers
By default, the Add Bookmark button (+) is attached to the URL address in Safari 4. There isn't an option to turn it off, but there's a workaround:
  1. Select the View » Customize Toolbar... menu option.
  2. Drag the standalone Add Bookmark button to the toolbar; it's in the top row. This will break the (+) off the address bar.
  3. Drag the Add Bookmark button off the toolbar. It will poof and leave you with a plain address bar.
  Post a comment  •  Comments (22)  
  • Currently 2.83 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (12 votes cast)
 
[15,761 views] Email Article To a Friend View Printable Version
Right-click Safari 4's window title to see site hierarchy Web Browsers
I don't know if this was already documented, but in addition to using Command-click on the Safari window title to show the nested directories for a web site, Safari 4 lets you do it with a right-click (or Control-click) of the mouse as well.

[robg adds: I was positive we had this documented here, but I can't find it while searching now. If it's been posted before, please let me know.]
  Post a comment  •  Comments (6)  
  • Currently 1.57 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (7 votes cast)
 
[6,000 views] Email Article To a Friend View Printable Version