Fix Safari for Slow and Loading by Disable DNS Prefetching

I’m wondering why Safari on my Mac always slower load on, but fast in Google Chrome. I did set the DNS for my network to Google DNS and and it doesn’t help much. reverse the IP differently from different location, if your browser prefetching it, maybe slow down from the previous IP you get. So I tried to disable the DNS Prefetching using the Terminal.

defaults write WebKitDNSPrefetchingEnabled -boolean false

If I want to re-enable again, I can run this in Terminal.

defaults delete WebKitDNSPrefetchingEnabled

I feel that the loading speed is faster than before.

Minimum HTML5 Template

I use this minimum HTML Template to write simple output with coding sometimes.

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <link rel="stylesheet" href="style.css">
    <script src="script.js"></script>
    <!-- page content -->