Featured post
php - GZip Compression For JQuery Without Server Access -
all. required build website each page under 130kb. know jquery 1.4.4 ~28kb when it's g-zipped, it's 77kb minified, particular assignment. have built entire site using jquery in 1 implementation or on each page, scrapping mean days of wasted time.
with in mind,
1) can add content headers javascript file add "content-encoding: gzip" without modifying config files on server end? i'm uploading them university server, don't have access configuration. response header, server is: apache/1.3.26 (unitedlinux) mod_ssl/2.8.10 openssl/0.9.6g php/4.2.2 mod_perl/1.27
2) phpinfo file, know zlib compression enabled, "zlib.output_compression" not.
3) realize can done using .htaccess. however, i'd other way, if possible, since don't want school thinking i'm trying modify server configuration.
4) xhr's setrequestheader method work here, or asynchronous files?
i know short notice , all, final presentation tomorrow, , i'll lose ton of points if site on size limit. appreciated!
you have 2 options
use jquery hosted somewhere else supports gzip. file here need include http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js gives lot more advantages such parallel downloading of files , quicker page load times.
other options use php code zip jquery js , return it. here example http://www.lateralcode.com/gzip-files-with-htaccess-and-php/
- Get link
- X
- Other Apps
Comments
Post a Comment