1 1. Before enable gzip compression there
is no content-encoding : gzip in Response Header.
- How to see response header?
Firstly, inspect your project in browser . For inspect right click and then select a option inspect. Then your screen will look likes
2. Connect EC2 instance through any SSH tool like Putty
- Putty is login as ec2-user.
- Now go to tomcat installed directory by entering command given below.
- cd /usr/share/tomcat8/conf
- List down all the files under this directory by entering command ls
- Open server.xml file in edit mode by entering command sudo vi server.xml
- Then you will see a screen like this.
- You have to search for a tag <Service name="Catalina">
- Under <Service name="Catalina"> this tag you have to search for a tag like given below and make all changes under this tag.
- See the highlighted part and make all changes.
<Connector
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
compression="on"
compressionMinSize="2048" noCompressionUserAgents="gozilla,
traviata" compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript"
redirectPort="8443"
/>
- After changes your screen will look likes
- After enabling gzip compression our response will look likes
Great Article
ReplyDeleteIEEE Android Projects for CSE
Java Training in Chennai
FInal Year Project Centers in Chennai
Java Training in Chennai