After furthur testing, it does work great but I keep getting an error now on my website quite often (but not all the time):
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
Please contact the website owners to inform them of this problem.
When I remove this from functions.php, I do not get the error anymore. Again, the error does not ALWAYS occur, but every few clicks to various parts of my website I get that error.