I have been developing a parental control software program for my company, but have run into a problem. The software uses policy listings stored in a MySQL DB to determine whether to block a website or not. It uses a local proxy. Each time a website is visited, the proxy sends that site to the server, then the server determines if the site should be blocked or not based on the settings for the user. The software is done, but there is one major problem. It takes too long for the address to be sent to the server, and the server’s response to get back to the proxy. Browsing speed is slowed down a lot when using the software. Is there a better way to do this?
The proxy is written in Python and everything on the server end is done in PHP.
Are you caching the server’s responses locally on the client? If not, you should – it ought to speed things up considerably.
And if you’re asking your server about each URL, you should only ask about the domain name, so that the number of requests per site goes down from lots to only one. (Unless there are domains for which you only want to ban a part of it, but that seems unlikely.)