Why does TextEdit still attempt to resolve href elements when opening HTML as code ?

On older OS's TextEdit would open an HTML file as text quickly.

I only recently discovered on High Sierra that although "Display HTML files as code" is chosen in preferences, any href elements that are in the HTML code are still being resolved before the content is displayed (as plain text)

This is a major pain for some files that contain many <link href elements because the system attempts to make a network connection for every element in sequence and this takes many seconds to complete.

Some files can take over a minute just to open as plain text.

If I disconnect from the network, the system still attempts to resolve all the hrefs

This is not what I expect from "Display HTML files as code"

I don't know whether the fault lies within TextEdit or the underlying file protection services, but I don't believe it should be doing this.

I can create a workaround with a shell script that changes the HTML content prefix to insert a character in front of <!DOCTYPE, and after that TextEdit opens the file in an instant, but that's a bit clunky.

Can anybody verify this for later systems ?


Posted on Jul 14, 2025 04:23 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 14, 2025 07:50 AM

TextEdit is not a programmer's editor and far from what you really need for HTML/CSS coding. The recommendations for TextMate or BBEdit are sound for this purpose. You just need to find versions that work on High Sierra.


The current downloadable version of BBEdit requires macOS 12 (Monterey) or later. So you need the older BBEdit 12.6.7 for Sierra 10.12.* through Mojave 10.14.*. TextMate 2.0.23 requires macOS 10.12 or later.

3 replies
Question marked as Top-ranking reply

Jul 14, 2025 07:50 AM in response to inept_get

TextEdit is not a programmer's editor and far from what you really need for HTML/CSS coding. The recommendations for TextMate or BBEdit are sound for this purpose. You just need to find versions that work on High Sierra.


The current downloadable version of BBEdit requires macOS 12 (Monterey) or later. So you need the older BBEdit 12.6.7 for Sierra 10.12.* through Mojave 10.14.*. TextMate 2.0.23 requires macOS 10.12 or later.

Jul 17, 2025 12:00 PM in response to inept_get

Neither of the responses answered my questions. I can't see how they got upvoted. However, the problem was eventually resolved by installation of Security Updates 2020-005 and 2020-006, and then allowing the YaraScanservice to run until completion (about 35 minutes)

Now Textedit opens html as text without calling upon DNS and it does so almost instantly.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Why does TextEdit still attempt to resolve href elements when opening HTML as code ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.