I found one solution for the same.
There is also a setting in the IIS for enabling the static and dynamic compression. Install the dynamic compression in IIS, and this will work.
Also I cleared the cache and re deployed the application and it worked.