Please refer - http://web.guru99.com/perl-subroutines/ I am calling the file http://code.guru99.com/perl/perl.js inside the corresponding wordpress post.
The file is 750KB in size I am using WP Super cache but it does not cache or compress this file (maybe since it’s called in the post section).
How can I compress and cache this file before serving to the end user ?
Sanjay_6
0
Newbie Poster
Recommended Answers
Jump to Postif an apache server you can enable mod_gzip or mod_deflate in .htaccess for this filetype something like the codescrap below, which zips the most zippable filetypes
<ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* …
Jump to PostI think mod_deflate / mod_gzip is a better suggestion
this linemod_gzip_item_include file .(html?|txt|css|js|php|pl)$
compresses all the filetypes listed, served from the server
All 5 Replies
almostbob
866
Retired: passive income ROCKS
dingoellis
0
Newbie Poster
almostbob
866
Retired: passive income ROCKS
Sanjay_6
0
Newbie Poster
almostbob
866
Retired: passive income ROCKS
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.