How To: Force Safari to Download PDF Files

How To: Force Safari to Download PDF Files

I hate having my Internet Browser display PDF files when I click on them. I much prefer them to be downloaded. Here are two commands that changes this default behavior.

in terminal (as Admin or Root user) type:
defaults write com.apple.Safari
WebKitOmitPDFSupport -bool YES

Essentially you’re removing PDF Support from Safari so that it doesn’t know what to do with the files. Safari simply downloads the file to the /User/Downloads directory instead.

Keep in mind that updating Safari or Adobe Acrobat may change the PDF handling behavior back to the default. Yes, it is also possible to right click on a PDF and use “Download Linked File,” but this process is more automated.

Troubleshooting: Facebook constantly logs out in Safari

**Update** Facebook made updates that fixes this problem.

Troubleshooting: Facebook constantly logs out in Safari

A recent problem has cropped up with the latest version of Safari, 3.2.1 and Leopard 10.5.6. When using Facebook (and possibly other websites such as Last.fm, Gmail, and Twitter, that require authentication to login,) users are finding that they constantly have to re-login again. Of course this gets annoying, and makes accessing those sites nearly impossible. This problem is bad enough that it could even be affecting Firefox users too.

The culprit maybe partially on Facebook’s side as they attempt to combat the recent virus threats and the Leopard/Safari upgrade may be coincidence. Another guess is that Apple changed how multiple programs handle cookies and this is causing issues.

In addition users of iPhones and Adium in conjunction with Facebook seem to have a high chance of having an issue. Using Facebook Chat in Adium and on the iPhone is one of the culprits.

While not a guarantee, here are some possible fixes.

iPhone Users: (may have to be jailbroken to work, I do not have an iPhone to confirm)
1.) Download a terminal program for the iPhone
2.) chown -R mobile /var/mobile/
3.) Power Cycle the iPhone

It seems that the /var/mobile directory is owned by the root user instead of mobile and is causing some of these problems problems.

Adium Users:

  • Disconnect from Facebook or Google Chat before logging in to Facebook or GMail
  • Safari: One or all of these options may be needed to fix

  • Disable Private Browsing (Under Safari Menu, the Private Browsing)
  • Empty Safari Cache (Safari Menu, Empty Cache)
  • Clear Cookies (Safari Menu, Preferences, Security, Show Cookies, Remove All)
  • Reset Safari (Safari Menu, Reset Safari)
  • Reinstall Safari (Download from here)
  • Remove Autofill (Safari Menu, Preferences, Autofill, User Names and Passwords, Edit, remove the site that is having issues)
  • Remove Keychain Entry (Applications/Utilities/Keychain Access. Remove affected site, then go to Menu, Keychain First-Aid, then Repair.)
  • Delete cookie.plist file (/User Home Directory/Library/Cookies/Cookie.plist)
  • Advanced Safari Tip: Enable Developer menu using the command line: defaults write com.apple.Safari IncludeDebugMenu 1 or download Safari Enhancer and clear cookies from this menu.

    Dashboard:

  • Disable any Web Clippings
  • If any of these do work, or you have another solution (or a question about the above,) let me know in the comments and I’ll see what I can do.

    How To: Fix Safari 3.2 Crashing

    I’m still a huge fan of Apple’s Safari Browser. I feel it’s faster (and much less of a memory hog) then Firefox.

    But, the 3.2 Updated introduced a strange bug. Whenever I use tabbed browsing, it started crashing a lot. Clearing Cache and deleting preferences have not fixed at all. Even Onyx didn’t seem to help.

    I was able to find a nice utility called AppleJack that really helped a lot. It can be downloaded from this VersionTracker Link: http://www.versiontracker.com/dyn/moreinfo/macosx/19596

    Once AppleJack is installed reboot the computer. While it’s restarting hold down the ‘s’ key to go into single user mode. type (as an admin user): applejack auto restart

    The computer will do a bunch of stuff cleaning up files, checking disks, etc, then reboot automatically. After this, Safari should all be good to go.

    I have also heard that reinstalling Safari totally with the stand along installer off of Apple’s website fixes this issue.

    How To: Speed up Web Surfing

    How To: Speed up Web Surfing

    We would all like to surf the Internet a little faster. Unluckily Web Browsers, Network speed, and computer speed all conspire to make surfing the web as slow as possible.

    Luckily each browser has a couple of tweaks that can be used to make things go faster.

    Firefox
    Firefox actually has the most options to affect network speeds. So many in fact that not only does Mozilla have a page about it, there are several blogs about it. These are very easy to access, simply type: about:config in your address bar.

    Change the following settings:

  • network.http.pipelining, change the value from 4 to 8.
  • network.dns.disableIPv6, change value to true
  • network.http.proxy.pipelining, change to true
  • If those feel like to much trouble, there is a Firefox plugin that helps: chromedit

    Internet Explorer

    This first tip is Vista specific and is untested by me. I’ve heard that it works extremely well though but just like all these other settings your mileage may vary. http://www.wisebread.com/quick-vista-hack-to-get-you-browsing-at-high-speed-again

    The second tip is a bit more general. Using regedit we change the default number of connections from two to a larger number. Keep in mind that this will not always be reliable as some larger sites will limit the number of connections on their side.

  • Go to Start -> Run
  • Type “regedit”
  • Go to the value: HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings
  • On right side check for these two values: MaxConnectionsPerServer MaxConnectionsPer1_0Server
  • If they’re not present: right-click on the white region of Regedit’s right-hand column, click New, and then click DWORD Value.
  • Type: MaxConnectionsPerServer and hit enter
  • Right Click again and add the value: MaxConnectionsPer1_0Server
  • On each value, MaxConnectionsPerServer and MaxConnectionsPer1_0Server, click on decimal and change the number from 2 (or 0) to something like 6 or 8
  • Close Regedit, start Internet Explorer and enjoy
  • Safari
    Speeding up Safari is a bit different then the other browsers. You are actually SLOWING the browser down. Safari has a setting that changes the delay on the browser from one second to a slower integer. In Terminal (with Safari closed) type: defaults write com.apple.Safari WebKitInitialTimedLayoutDelay 0.25

    The last number is time in seconds and can be anything between 0 and 1. So 0.34 or .81 are acceptable along with the more rounded 0.5 and 0.75.

    Another good hint is to clear the cache, favorites icons, addons, and removing the preference file. Macrumors put together a great page showing how to do that.

    Keep in mind that most of these will not drastically speed up your Internet, it’ll be a small but usually noticeable speed increase. Keeping your computer in top shape and virus free will also go a long ways towards helping speed up the your web surfing.