skip to Main Content

i have big json file that i load in the index.js On page load (javascript) file which leads to increase in the time of loading the page.

What should i use to reduce this so that the page loads fast?

2

Answers


  1. You need to enable gzip on your server level, In configuration compressableMimeType you can specify which type of data to be compressed.

      <Connector port="8090" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8444"
    compression="on" compressableMimeType="text/html,
    text/xml,text/plain,text/javascript,text/css,application/json" />
    

    You can visit http://viralpatel.net/blogs/enable-gzip-compression-in-tomcat/ for configuration steps

    Login or Signup to reply.
  2. In your Apache configuration, set mod_deflate parameters. See here for complete doc

    Depending on your configuration, apache config could be located:

    Windows C:Program FilesApache GroupApache2confhttpd.conf
    Linux: /etc/httpd/conf/httpd.conf

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search