You can check your website GZIP compression using GOOGLE Page Speed.
How does it work?
Suppose we want to https://discussdesk.com//. So when our client(Browser ) gives the request for this page to our webserver. Then web server respond with response code 200 OK and send the file with all supported file in actual file size to the client.
After using compression technique, it will reduce our website file size and when any client request for that page, then our web server serves the compress file that will get load fatser.
How to enable GIZP Compression
GIZP Compression can easily be enabling by just adding some code to our .htaccess file. Just add the below code to your .htacces file and save it.
Now just refresh your web server and check GZIP Compression from compression testing tool.
In Apache, there are two compression options are available
If you are unable to access the .htaccess file or you cannot change or rewrite the .htaccess file then you can directly write a simple PHP code to common file on the top of your web page.
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
This also send Accept-encoding with the header and compress the file but better to use Apache GZIP compression.
Now you can check for GZIP compression online.