How to troubleshoot and fix strange website errors with macOS Safari

Everything may seem normal except one site.

safari icon osx
Apple

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

Modern websites have a legitimate reason to push a lot of data to your browser that it retains for future sessions. This can vary from a browser “cookie” that maintains a session for a short period of time to other identifiers and even databases that are pulled up, but only when you visit the site again.

This can snowball into “cruft,” a catchall term for digital code you don’t want. In particular, I see a problem with it in Safari, and have a way to troubleshoot and fix it.

You’ll realize something is amiss is when you visit a website you use routinely and receive an odd error. You try closing windows, quitting the browser, even restarting your Mac, and the problem persists. My credit-union site, for instance, will throw up a server error that says my headers are too long and malformed. Thank you very much, but my headers are just fine!

Rather, there’s an interaction between data stored on behalf of the credit union by its servers and Safari sending that data back (or consulting it via JavaScript on the credit union’s webpage) that causes the server the expel the error. I expect in my case it’s because I have both business and personal accounts at the institution, and log in and out of them at different times. The error is in their system design, which doesn’t create unique tokens for each session, and thus retrieves data meant for another account and has a little software meltdown.

You can check whether stored website data is the problem by opening a private browser tab in Safari (File > New Private Window), visiting the site, and logging in. Private browsing windows don’t send any stored information, cookies or otherwise, and only retain site-specific details for as long as the tab in the private browsing window remains open. Launching another browser can let you cross check as well, like Chrome or Firefox.

If the site loads fine in private browsing or another browser, the problem then is surely stored data. Safari lets you purge data on a domain-by-domain basis:

  1. In Safari, select Safari > Preferences.
  2. Click the Privacy button.
  3. Click Manage Website Data.
  4. In the Search box at the upper right, enter part or all of the domain of site in question. It’s best to enter the least amount of information. So if the domain is bank.com, but they have secure.bank.com and loans.bank.com you enter just bank.com.
  5. Select the items that match, click Remove All, and confirm the removal. This only deletes locally stored information, not material from the remote site.
  6. Close the preferences dialog box and log in fresh.
mac911 safari delete local storage IDG

The Manage Website Data area lets me delete locally stored data associated with a site, like cookies and databases.

(Note in step 4 that you may have to wait for a while for the data to load if you are a heavy browser user. For me, on many occasions, the list never populates—it just says “Loading Website Data” indefinitely. I have to close the dialog and open it again, sometimes repeating that operation several times, before the list appears.)

If after step 6 the site still doesn’t work, but you were able to use a private browsing window or another browser, it’s time to contact the site for technical support help.

Ask Mac 911

We’ve compiled a list of the questions we get asked most frequently along with answers and links to columns: read our super FAQ to see if your question is covered. If not, we’re always looking for new problems to solve! Email yours to mac911@macworld.com including screen captures as appropriate, and whether you want your full name used. Every question won’t be answered, we don’t reply to email, and we cannot provide direct troubleshooting advice.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
  
Shop Tech Products at Amazon