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

Enable the Web Inspector tool in Safari 3 beta Web Browsers
I've installed the Safari 3.0 beta, and so far I like it. While I was trying to dissect some CSS - JavaScript, I suddenly remembered I'd read about enabling a pretty neat Web Inspector tool in one of the nightly builds:


So I tried it, and it works perfectly in the public beta of Safari 3.0. Quit Safari, open Terminal, and type:
defaults write com.apple.Safari WebKitDeveloperExtras -bool true
Launch Safari, and control-click somewhere on a web page. You will see a new Inspect Element entry in the contextual menu. Select it, and it will open up the Web Inspector and refocus to the node under your cursor.

[robg adds: You also get the inspector, automatically, if you enable the Debug menu (as has been described here before, and is repeated in another hint today).]
  Post a comment  •  Comments (2)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[37,325 views] Email Article To a Friend View Printable Version
View SVG images in Safari 3 beta Web Browsers
One of the nice new features of the new Safari 3 beta is that it can display Scalable Vector Graphics (SVG). Check out an example image here.

[robg adds: As best I can tell, support for SVG isn't mentioned on Apple's Safari pages, nor in the Welcome.rtf file in the installer files. I won't be running any other posts on the features of Safari 3, so if you can provide detail on other new stuff you may have found (beyond the obvious new menu items and the features Apple has described), please add in the comments.]
  Post a comment  •  Comments (8)  
  • Currently 2.40 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[21,333 views] Email Article To a Friend View Printable Version
How to use Safari 2 WebKit after installing Safari 3 Beta Web Browsers
After installing Safari 3 you won't be able to run Safari 2 to test websites or whatever any more. Here's one way to make them both available:
  1. Install Safari 3 Beta
  2. Rename /Applications » Safari.app to Safari3.app
  3. Install WebKit Nightly
  4. Rename /Applications » WebKit.app to Safari2.app
  5. Unarchive the backed up Safari -- expand /Library » Application Support » Apple » .SafariBetaArchive.tar.gz
  6. Copy the old Safari from /Library » Application Support » Apple » .SafariBetaArchive » Applications » Safari.app to /Applications » Safari.app
  7. Copy all the frameworks into Safari2. Inside the .SafariBetaArchive folder, you'll find these frameworks:
    • System » Library » Frameworks » WebKit.framework
    • System » Library » Frameworks » WebKit.framework » Versions » A » Frameworks » JavaScriptCore.framework
    • System » Library » Frameworks » WebKit.framework » Versions » A » Frameworks » WebCore.framework
    Copy all of these into /Applications » Safari2.app » Contents » Resources
That's it; now you can open Safari2. If you need it, there's much more detail in this post on my blog. I also include a shell script solution for getting both versions of Safari working.
read more (96 words)   Post a comment  •  Comments (12)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[24,431 views] Email Article To a Friend View Printable Version
Enable the Debug menu in Safari 3.0 for Windows Web Browsers
If you're a web developer, Safari's Debug Menu is a necessity. Fortunately for those of us stuck in Windows, Safari's Debug menu is still available, however, it appears you have to get your hands dirty to enable it. On a Mac, you'd open a Terminal and type:
defaults write com.apple.Safari IncludeDebugMenu 1
As far as I can tell, Windows doesn't have Apple's defaults utility. Instead, you have to directly edit the plist file, where the preferences are stored and the Debug menu is enabled. This is just a plain-text XML file. So to enable the Debug menu in Safari for Windows, add the following key-value pair to c:\Documents and Settings\your username\Application Data\Apple Computer\Safari\Preferences.plist:
<key>IncludeDebugMenu</key>
<true/>
Insert the above code before the closing </dict> element and restart Safari. It seems a little more spartan than Safari for Mac's debug menu, but at least it includes a JavaScript console and User Agent switching. (I also posted this on my blog.)
  Post a comment  •  Comments (3)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[34,203 views] Email Article To a Friend View Printable Version
Fix a bookmark-related crash on Safari 3 for Windows Web Browsers
When Safari 3 beta was released for Windows, I immediately tried to install it on my Windows XP machine at work. Unfortunately, the windows beta is more of an alpha, and IMHO, should never have been released. On my installation (Dutch Windows XP), Safari was crashing when trying to show bookmarks or add a new bookmark. A quick check revealed that the Bookmarks.plist file was missing.

As I did not have my Mac available to copy a bookmarks.plist file from, I tried to manually create an empty bookmarks.plist file, taking another .plist xml file as example, but alas, this did not work. Then I discovered a file named BuiltInBookmarks.plist inside the en.lproj folder: C:\Program Files\Safari\Safari.resources\en.lproj. This file seems to be in a binary format (not XML), which may have caused my manually crafted .plist not to work. So here's how I solved the problem:
  1. Quit Safari
  2. Find the file BuiltInBookmarks.plist in the C:\Program Files\Safari\Safari.resources\en.lproj\ folder
  3. Copy the file to the Safari preferences folder: C:\Documents and Settings\your username\Application Data\Apple Computer\Safari
  4. Rename the copied file to Bookmarks.plist and start Safari
If all went well, there will be some default bookmarks in the bookmarks toolbar. On my machine, Safari automatically imported bookmarks from Firefox and Internet Explorer, showing an errormessage 'Safari is missing some important resources' at some point. Restarting Safari solved the issue and bookmarks are now working fine.

NOTE: The imported bookmarks are not added to the Bookmarks menu. Choose Show All Bookmarks from the Bookmarks menu to view the imported bookmarks.
  Post a comment  •  Comments (1)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[8,702 views] Email Article To a Friend View Printable Version
Tell Firefox to restore tabs and windows on launch Web Browsers
Sometimes you need to quit Firefox, but you don't want to lose all of those open pages and tabs. How do you quit Firefox, relaunch it, and quickly get back to where you were? I've seen some hints that suggest force quitting Firefox or using extensions. But Firefox has this feature built in -- it's just not where you expect it, so many people don't know it exists.

On the Main tab of Firefox's Preferences, change the When Firefox starts pop-up to 'Show my windows and tabs from last time.' That's it. Now if you quit Firefox with open windows and tabs, those same windows and tabs will be reloaded the next time you launch Firefox again.

[robg adds: Yes, it's a hint on a documented feature, but I ran a quick iChat poll and nobody knew about this, so I figured it was worth sharing.]
  Post a comment  •  Comments (3)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[12,453 views] Email Article To a Friend View Printable Version
Open multiple Gmail accounts at once Web Browsers
I like to have more than one Gmail account open at the same time. As you can't have more than one in the same browser, I use Firefox's ProfileManager flag to manage one profile for each Gmail account. Type in terminal:
/Applications/Firefox.app/Contents/MacOS/firefox -ProfileManager \
https://mail.google.com/mail/
The first time you do this, you'll create a new profile, one for each of your Gmail accounts. Launch this command each time you wish to open a new account. The Dock will display multiple Firefox icons, one for each open profile. If you wish, you can check "Remember me on this computer." As Firefox passwords are not managed by Keychain, you can store one for each of your accounts. You can also do this in Safari. Type in terminal:
/Applications/Safari.app/Contents/MacOS/Safari \
https://mail.google.com/mail/
Each time you launch this command, a new instance of Safari will open. You can then login to a different Gmail account in each. If Safari is not your default browser, use a gmail.webloc file instead of a URL:
/Applications/Safari.app/Contents/MacOS/Safari \
path/to/file/gmail.webloc
(Just drag your browser's Gmail favicon to the desktop, and then onto your Terminal window). The Dock will display multiple Safari icons, one for each open istance.
  Post a comment  •  Comments (2)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[34,858 views] Email Article To a Friend View Printable Version
Resume browsing session in Firefox Web Browsers
I often need to restart my computer or quit Firefox to free up RAM, but don't want to lose all my open tabs. I find the following solution by accident: Force quite Firefox (Cmd-Opt-Esc), and the next time you launch Firefox it will ask you if you want to restore your session, and will load all the tabs and windows you had open before the quit. A hack, yes, but a useful feature not implemented in the normal interface!

[kirkmc adds: I'm not a regular Firefox user, and can't find any other way to do this in the help. Is there any other way?]
  Post a comment  •  Comments (21)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[15,155 views] Email Article To a Friend View Printable Version
Fix Safari AutoFill to recognize "Postcode" for Australia Web Browsers
Safari's "AutoFill Form" (Cmd-Shift-A) function is useful for quickly entering name and address details in a web page from your "own" address card in Address Book, but it fails to complete what we call the "postcode" in Australia. Probably because it's looking for a field labelled "zip code", I assumed, and Australian web forms have this labelled "post code" or "postcode". So I wondered if this was configurable.

I found the solution it in Contents/Resources/English.lproj/ABAutoCompleteMappings.plist within the Safari.app package. To open this in the Finder, right-click (or Ctrl-click) on Safari.app in the Applications folder, select "Show Package Contents", then navigate to Contents -> Resources -> English.lproj. Make a backup of ABAutoCompleteMappings.plist (Cmd-D does this nicely), then open ABAutoCompleteMappings.plist in Property List Editor (if you have Developer Tools installed) or any text editor.

If you are using a text editor, you will find the following starting at or around line 134:

                <dict>
                        <key>ABProperty</key>
                        <string>Address</string>
                        <key>ABKey</key>
                        <string>ZIP</string>
                        <key>FieldLabels</key>
                        <array>
                                <string>zip</string>
                                <string>zipcode</string>
                                <string>zip code</string>
                                <string>postalcode</string>
                                <string>postal code</string>
                        </array>
                </dict>
So now we know that Safari responds to a field labelled "zip" or variants (for the USA obviously) or "postalcode" with optional space (I guess for the UK and/or Canada).

I duplicated the "postal code" line twice, then modified the new entries to add "postcode" and "post code" to the array:

                                ...
                                <string>postal code</string>
                                <string>postcode</string>
                                <string>post code</string>
                 	        ...
If using Property List Editor, add the extra entries to Root-> Mappings-> 11-> FieldLabels.

Save the file, restart Safari and test. This works for Mac OS X ver 10.4.9. Other versions may vary in the details.

[kirkmc adds: I haven't tested this. Obviously, this may also be useful for people in other countries, or working in other languages. Also, you may want to check some of the other keys in the file if you find that, in your country or language, you often have fields that don't auto-fill.]
  Post a comment  •  Comments (4)  
  • Currently 3.67 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (3 votes cast)
 
[10,012 views] Email Article To a Friend View Printable Version
10.4: Launch Dictionary via Safari keyboard shortcut Web Browsers
As was mentioned here before, you can look up words in Dictionary if you have your dictionary already up and running. But what if you don't? Here is a quick way to call the Dictionary.app from Safari.

Bookmark a web page; say this one that you're reading right now. Then go to your bookmarks and find the URL that you have just bookmarked. Replace the text under the Bookmark title with something relevant, like Dictionary, and the URL under the Address with dict:///. Now add your modified URL into the Bookmarks Bar, at the leftmost position.

Now hit Command-1, and there is your Dictionary. Simply start typing your query.

[robg adds: Command-1 works, for those who don't know, because Safari automatically assigns Command-1 through Command-9 to your first nine non-folder bookmarks.]
  Post a comment  •  Comments (9)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[18,637 views] Email Article To a Friend View Printable Version