DNS Caching Server
If speed of your ISP’s DNS servers is low then browsing through Squid may seem to be slow. The reason for this - Squid does name resolutions for each browser request. This takes excessive amount of time when DNS servers of your ISP are slow or overloaded. To greatly improve browser experience it is recommended to install dnsmasq caching DNS server on your Squid box.
To install dnsmasq on Ubuntu Server 16.04 LTS run the following commands.
$ sudo apt-get install dnsmasq
Now you need to configure Squid to use the locally installed dnsmasq server. To do that, navigate to UI / Squid/ Settings / DNS and add the DNS address as indicated on the following screenshot.
Click Save and Restart from Web UI. Reboot your proxy afterwards and after reboot your Squid will use the local DNS cache provided by dnsmasq.