Facebook not loading properly in Safari -- no stylesheet/CSS -- and speeding up Safari

Wed Jul 29, 05:03 PM

A persistent issue I’ve had across several Macs is Facebook not loading correctly in Safari. The site’s text appears but the stylesheet/CSS doesn’t load, so it looks a mess and is unusable.

The reason for this is bizarre. Facebook (and other sites that you might have this problem with) use HTTPS for some of their data, and HTTP for basic things like stylesheets.

HTTPS relies on your system time being accurate. And the time on Macs might not be.

If you open System Preferences, and click Date & Time, you’ll probably see that there’s a check alongside Set Date and Time Automatically. Things should be fine, right?

It appears, crazily, that Apple’s time servers (NTP) are a few seconds wrong.

And would you believe the solution to this problem might speed-up Safari too?

EDIT: See below. That solution is to click in the server field alongside the checkbox mentioned above and type the following – you can indeed type there, rather than just choose from the three choices in the dropdown list:

pool.ntp.org

This uses the central Internet NTP time server.

Load Facebook. You’ll see things are fixed. Weirdly, you might find your browsing is now speeded up too. There might not be a delay with Google searches taking place from the omnibar of Safari — and again, it’s no coincidence that Google searches in Safari are done via HTTPS.

EDIT: This is a rabbit hole of a bug in Mac OS X that apparently surfaced in Mavericks and continues in Yosemite.

The issue is that the NTP server in OS X is unreliable. This post on the Apple Discussion Forums explains why (it’s to do with power saving and file caching), but there isn’t really an acceptable solution. Some people recommend installing a different version of the NTP software but, as mentioned, this will interfere with power saving. On an iMac, Mac Mini or Mac Pro that’s not a huge issue but it is on MacBooks.

One solution I’m trying right now is to set the time manually on OS X — that is, remove the check from Set Date and Time Automatically in System Preferences — and to retard the time a few seconds according to this website, which shows atomic clock-accurate standard time. In other words, if the official time is 10.20 and 30 seconds, you set your clock to 10.20 and 27 seconds. This approach seems to be working for me at the moment but the “drift” that messes things up happens over the space of hours and days, so I’m not yet sure if it’s a long term solution.

Keir Thomas

,

Know better?

---

Switching to an Apple Magic Mouse and Bluetooth keyboard

Tue Jul 28, 04:33 PM

Okay. I admit I’m coming at this one a little late.

I bought a Bluetooth Apple Keyboard and Magic Mouse. And I love them. The keyboard isn’t much different from my USB wired Apple Keyboard although it lacks the numeric keypad and home key arrangement. This is taking a little getting used to, because my hands constantly orientate themselves wrong. The keyboard also doesn’t sit directly in front of me on the desk, but slightly to left of me, which is kinda weird. But I love small keyboards. There’s something pragmatically efficient about them. This one just feels right. The key action is also a little more positive than the older wired keyboard too.

The Magic Mouse was a complete gamble. There are some very negative reviews and feedback out there. I’d tried one at an Apple Store and found it induced instant hand cramp. But one huge failing of Apple Stores is that they’re not really designed to let you try things in a natural environment. The Apple Store designer prefers stools over standard office chairs, for example. iPads are tied to the table for security reasons.

I find the Magic Mouse a completely natural thing. True, it requires some adjustment and if your existing ergonomics aren’t correct then the Magic Mouse will pay you in pain. You need to ensure your arm is level with the mouse surface. Additionally, if you’re using the multitouch surface in the same way you might use a standard PC mouse’s scroll wheel — which is to say you’re leaving your hand on top and just moving your index or middle finger when scrolling — then you’re doing it wrong. The surface is like a trackpad. If you want to use it then you need to move your hand back and to one side and trust in the weight of the Magic Mouse as you swipe up or down.

Get over the adjustment, however, and you’ll once again realise why Apple is so good at design. The Magic Mouse makes total sense. It makes an existing task even easier, and it makes it fun. Windows and PCs are all about “good enough” computing. Things work, and things are good enough to get stuff done, although rarely elegant. Apple goes the extra distance to make using something a joy — to make it enjoyable. There’s no better example of this, I think, than the iPad. This relies on the user enjoying using it. The iPad has to be enjoyable to use, or it couldn’t succeed – and this is shown in the lacklustre market for Android tablets. Prior to the iPad’s arrival we hadn’t learned to simply endure tablet computing devices. If we had, then the iPad story might not be the same.

Alas, I’m fairly certain that I’ve just bought an Apple Magic Mouse right before Apple will announce a new model with Force Click and maybe even haptic feedback. It’s just such an obvious feature upgrade. Still, I’m happy with the mouse and I don’t really use Force Click on my MacBook’s trackpad anyway.

Keir Thomas

,

Know better?

---

Repairing a Time Capsule

Sat Jul 25, 05:43 PM

Apple’s Time Machine backup system is a work of genius. Just attach a USB/Firewire/Thunderbolt drive to your Mac, and it’ll quite literally take care of the rest. It backs up the entire disk — the system and your data, all in the same scope.

Even better is a Time Capsule. This is hardware from Apple that puts a hard disk inside a AirPort Wi-Fi base station, so that you can use Time Machine across Wi-Fi or an Ethernet connection. You can just put the Time Capsule in the corner and leave it to run. No need to attach a USB disk.

The trouble is cost. Time Capsules are humorously expensive considering what they are: £249 for the cheapest 2TB model, for example, and a hundred quid more for 3TB. I mean, I can afford that, but I’d spend the rest of my life failing to comprehend how I could spend that much money on a basic hard disk coupled to a fairly basic Wi-Fi base station. Total manufacturing cost to Apple really can’t be more than £40.

So I just managed to fix up a broken Time Capsule and create my own 2TB model. The cost was £12 for the Time Capsule from an eBay seller, £50 for a 2TB drive, and £28 for a replacement power supply. If you’ve an old drive lying around you can use instead, and if you are good with a soldering iron, then you can bring that down to just the cost of the broken Time Capsule.

The Time Capsule I got was listed as having “no PSU”. The number one cause of death of Time Capsules is that the PSU (power supply unit) breaks because the Time Capsule gets very hot. The PSU itself generates heat, and the disk does too, and the ventilation design is poor (although they do contain a fan).

Specifically, the capacitors in the PSU blow.

From what he wrote, I anticipated that the seller had attempted to fix the unit himself with a replacement PSU but failed. I took a punt on the eBay purchase anyway and when it arrived it turns out the seller meant that there was no PSU cable. These are standard leads used the world over. The Time Machine hadn’t even been opened up for an attempted repair. It had just stopped working and he’d stopped using it.

I opened-up the unit and removed the PSU, electrocuting myself while doing so (be careful!). Sure enough, the capacitors looked “fat” at the ends. They’d blown. eBay revealed a UK seller retailing the exact part number. It was a reconditioned unit with a warranty for 90 days, and I guess they take blown PSUs and replace the capacitors themselves. If you’ve a basic knowledge of microelectronics then it’s probably very easy and insanely cheap to do this job yourself, but for me it’d be a lot of hassle.

With a new PSU in there, and a 2TB drive to replace the old built-in 500GB (which still works FWIW), the unit booted immediately. It works fine, although I had to format the disk. Because the Time Capsule is also an 802.11n wireless base station and print server, I plugged in my Dell 1130 laser printer so that I have one less USB connection to worry about (and to make the printer work properly — on a Mac the driver/printer firmware is broken so that you can only print one job before the printer crashes… A long story of annoyance and a decision never to buy Dell again.)

The unit does get very hot, which is a worry. Ideally I’d be using one of the “green” drives that use less energy and therefore give off less heat. The drive I’m using is 7,200RPM, a speed that just isn’t required in this instance, and will have an ensuing bigger power draw. It’s also an Enterprise-grade drive and I read somewhere these have bigger power demands, although I’m not entirely sure if that’s really the case. As far as I know, enterprise-grade simply means a stronger guarantee of useful lifetime is made.

Would I recommend anybody else do what I did? Absolutely. If you’ve ever rummaged around inside a PC then it’s a very easy job. I did it in minutes.

EDIT: I wonder a little if it’s possible to remove the disk inside entirely and attach the backup disk via USB. This would eradicate the heat issue entirely. If you’re using a desktop-sized drive it might require an external PSU but there are adapters that let smaller notebook disks run on just the juice from a USB port.

EDIT 2: I’m very concerned about how the Time Capsule runs hot 24 hours a day. This is a known problem and as mentioned above is the chief cause of PSU failure, but I guess Apple consider this to be within design parameters.

Spin down of the hard disk would help but it doesn’t appear to be happening in the traditional sense. The disk I used is a Western Digital RE4-GP model, which I learned via Googling is a server-grade version of the “Green” WD disk.

The drive apparently contains “green” electronics that amongst other things spins down slightly when the drive isn’t in use. I’ve heard the drive make a spin down-like noise (like a tiny drill slowing down!), yet I’m still able to feel the drive vibrating as if spinning. Weird. I’m hoping to dig out my watt meter to see if the power usage changes across time. (Note that early versions of the firmware of this disk spun down TOO MUCH, causing WD to release an optional firmware adjustment tool, although I guessed that’s been fixed in more recent releases.)

The Time Capsule offers no control over spin down via the AirPort Utility on a Mac/iOS, and WD don’t offer any firmware control either (and in any case I don’t think the spin down setting would stick across power cycles anyway).

So, the whole thing’s hot 24 hours a day. I live in the UK where ambient temperatures are (cough cough) never that high but in places like Australia or Florida this can be a huge problem.

My solution has been to

(a) remove the silicone mat on the bottom of the Time Capsule. Apparently this is designed to dissipate heat but its main job is to protect users from the metal plate beneath which, because the PSU is contained within the device, could be electrically live (it almost certainly won’t be, ever, but safety regulations are there for a reason I guess). On the bottom I’ve stuck some rubber feet, as found on many other electrical deices. There are lots of small holes in the metal plate but some people have augmented this by drilling their own larger holes. Argh, too much trouble for me. On the bottom I’ve stuck some rubber feet, as found on many other electrical devices, to provide ground clearance and space for air to flow.

(b) plug it into to a basic timer switch so that the Time Capsule is powered down between the hours of 12am-7am, when the family is sleeping. I’m a little worried that the Time Capsule is being abruptly powered down at this time, but then again there doesn’t appear to be any way to shut it down cleanly via software (again, the AirPort Utility is pretty crap). Time Capsule drives are formatted with Mac OS Extended Journalling FS, just like most Macs, and I know that this means recovery from unexpected power down is pretty good.

In fact, I’ve put the timer on the socket for the entire desktop’s computing equipment so that everything is powered down during that time. I’m a little concerned about the MacBook Pro cycling the battery during this period but Apple claim this is a very healthy thing, and in fact keeping the magsafe attached at all times is bad.

Keir Thomas

,

Know better?

---

Warning if repartitioning Yosemite with a MacBook Pro 2015 UPDATED

Sun Jul 19, 02:18 PM

Like many people I repartitioned my MacBook Pro 2015’s disk using Disk Utility in order to create space for the El Capitan public beta. Disk Utility lets you “live repartition”, which shrinks the existing partition while the operating system is up and running.

Unfortunately, yesterday the Yosemite partition pretty much self-destructed — I tried to run Activity Monitor but was told it was corrupted, which raised an eyebrow. When I tried to repair permissions using Disk Utility I saw hundreds of “Error 5 Input/Output” errors. A quick Googling was inconclusive but indicated that this could mean imminent disk failure.

Luckily I had a Time Machine backup so I wiped and restored (both the Yosemite and El Capitan partitions), and things are back to usual now. I subsequently verified/repaired the disk and erased the free space to test for read/write errors, and have seen nothing. So I don’t think it was a hardware fault (at least I hope not…)

My theories are that one or all of these issues might’ve been at play

(1) There’s an issue with the new PCIe-based flash multi-channel storage and Disk Utility hasn’t been updated, so repartitioning will fail
(2) El Capitan is still a beta so doesn’t play nice with other operating systems/partitions
(3) Both partitions were protected with File Vault and perhaps this played some kind of part in the corruption.

But the advice is clear: Be very careful repartitioning on a MacBook Pro 2015 with the new PCIe-based flash storage.

UPDATE 23 July 2015: Apple has released a SSD firmware update for the mid-2015 MacBook Pros, of which my Mac is one. Apple claims this fixes a bug that in “rare cases” causes data corruption. Hmmm… If your Mac is eligible for the fix you’ll find it in the Updates tab of App Store. Apple advises you backup your data before applying the update. Interestingly I ran disk benchmarks before and after applying the update. Afterwards, the SSD was marginally faster, although not to any appreciable degree because the SSD is already insanely quick.

Keir Thomas

,

Know better?

---

Stop files being automatically (re)created by apps

Sat Jul 18, 08:41 PM

Sometimes you might delete a config file or maybe an entry in /Library/LaunchAgents (or ~/Library/LaunchAgents), only to find it’s been recreated next time the app concerned runs.

It can be very frustrating, especially with apps from companies like Google and Adobe that like to run update processes in the background without your knowledge — or permission.

One solution is to simply rename the existing file with an .old extension, but before doing so copy all the text in the filename. Then create a new folder in that location, and paste in what you copied for its name. You might see a warning about file extensions but that’s OK — just go with it. Then select the new folder, tap Cmd+I, and choose to lock the folder in the Info dialog box.

This essentially blocks recreation of the file because when the app tries it’ll see that there’s already something there with that filename AND it’s locked, so can’t be modified.

Another way to do this if you’re a fan of the command line would be to simply use the touch command to create the dummy file, but at least with a folder you can see at a later date what you’ve done, whereas a touched file looks and smells legitimate — and could be confusing.

I’ve read another way to stop this happening is to lock the folder entirely — you could just lock /Library/LaunchAgents, for example. But this sounds like a shortcut to trouble.

Keir Thomas

,

Know better?

---

Update Failed/Updates could not be applied error with Adobe Creative Cloud

Sat Jul 18, 02:14 PM

Fixing a friend’s computer the other day I came across this unusual error that Googling wouldn’t reveal an answer for:

The solution is as follows:

  1. Open a Terminal window — you’ll find it in the Utilities folder within the Applications list.
  2. Type sudo, then space, and drag the AdobePatchInstaller file to the Terminal window.
  3. Hit Backspace to delete the space after the path you’ve just automatically inserted, and then type Contents/MacOS/AdobePatchInstaller ––mode=silent — note that’s two dashes before mode
  4. You should now have something that looks like the following:
  5. sudo /Volumes/Adobe\ Photoshop\ CC\ 2014/Adobe\ Photoshop\ CC\ 2014/AdobePatchInstaller.app/Contents/MacOS/AdobePatchInstaller --mode=silent
  6. Hit Enter, type your Mac’s login password when prompted, and wait until the command to complete. You’ll see End Adobe Setup. Exit code: 0
Keir Thomas

,

Know better?

---

iCloud Drive files getting deleted

Fri Jul 17, 01:18 PM

I don’t usually post links to other people’s stuff here at MKF but this one needs sharing.

If you use iCloud Drive you might already be aware of its shortcomings. This is a major one that can lead to lost files without warning.

And as for why it’s happening, take a read of this and the comments from an Apple engineer. It’s a crying shame.

As somebody who works at the coalface of their software I feel increasingly that – dare I say? – Apple is becoming another Microsoft. When tech companies get beyond a certain size they just seem to spin out of control. I know it’s easy to make such an obvious criticism but I have thought about it, and it feels true.

Within iOS and OS X things are buggy and half implemented, and just don’t get fixed. I’m starting to feel there’s a lack of respect for us end users. That’s what used to separate Apple from just about every other tech company. Apple would implement a terribly complicated and clever feature but not even mention it, which is why using Apple products was such a joy — and why sites like OS X Hints used to thrive.

It wasn’t perfect. It used to be the case that Apple might release something broken, or lacking features, but it’d get fixed next time around. But iCloud? It’s still maybe 10% of the quality of Dropbox in every respect. It’s chronically slow to upload and sync (a ceiling of circa 320Kbps in my tests – why?!). Files can get lost, without the user even being made aware. There’s no feedback on whether things have finished syncing globally. There’s no versioning of files. Sync errors are incredibly common, leading to duplicated files and user’s time spent fixing things. It feels like an internal testing feature that somehow made it out into the real world.

Come on Apple. You can do way better than this.

Keir Thomas

,

Know better?

---

"Code redemption temporarily unavailable" error in App Store when downloading El Capitan

Fri Jul 10, 05:03 PM

If you’ve joined the beta program for El Capitan (http://beta.apple.com) you might’ve been given a redemption code to use in the Mac App Store.

And you might get an error that the “Code redemption is temporarily unavailable. Please try again later.”

Try these two things:

1. Sign out of the App Store (click your username to get the option), quit App Store, and log back in again when you restart.
2. Repeatedly keep hitting the Redeem button when you see the error.

Keir Thomas

,

Know better?

---

Dark icons for FormatMatch

Fri Jul 10, 09:44 AM

I use FormatMatch to strip out text formatting. It’s no longer available in the App Store so I guess the developer has abandoned it (although it’s still available for download around the web — just Google). Unfortunately, FormatMatch is not compatible with Yosemite/El Cap’s “Dark” UI mode, where the menu bar turns black/charcoal. The icon’s black so this causes it to disappear.

Here’s updated icons for FormatMatch if you use Dark mode. To install them, right-click the FormatMatch app in the Applications list of Finder, and select Show Package Contents. Navigate to the Resources folder, and drop the two files in there (StripItOn.png and StripItOff.png) overwriting the existing icons. Then quit and restart FormatMatch.

This isn’t a technically correct fix because a good app should have icons for both standard and Dark modes. Additionally, I suspect somebody cleverer than me can also add in Retina icons, which are also missing. But until that happens these icons will suffice.

Keir Thomas

,

Know better?

---

WebKitDNSPrefetchingEnabled not working?

Wed Jul 8, 08:14 PM

A standard trick if Safari is slow for whatever reason is to issue the following command in a Terminal window:

defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false

This turns off Safari’s DNS prefetching, which is intended to speed things up but causes problems with some internet routers.

However, you might find it doesn’t stay activated (something you can check with defaults read com.apple.safari WebKitDNSPrefetchingEnabled — if the result is anything other than 0 (zero) then it’s deactivated itself). I played around and noticed that it kept turning itself off at random time intervals after being activated, and there didn’t seem to be any rhyme or reason to it.

Eventually I think I figured out the issue. If there are any entries in your /etc/hosts file then that might be causing the problem — for some bizarre reason.

The solution is to remove from /etc/hosts anything that shouldn’t be there by default. In short, /etc/hosts should look something like this:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost 

That’s it. Nothing below or above these lines.

Keir Thomas

,

Know better?

---

« Older



(c) 2013 Keir Thomas. Unauthorized reproduction in any form is prohibited. Short quotations from this blog
are cool so long as you provide a citation and a link to http://www.mackungfu.org.