This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function resize (file, maxWidth, maxHeight, fn) { | |
var reader = new FileReader(); | |
reader.readAsDataURL(file); | |
reader.onload = function (event) { | |
var dataUrl = event.target.result; | |
var image = new Image(); | |
image.src = dataUrl; | |
image.onload = function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_deflate.c> | |
#The following line is enough for .js and .css | |
AddOutputFilter DEFLATE js css | |
AddOutputFilterByType DEFLATE text/plain text/xml application/xhtml+xml text/css application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp text/html | |
#The following lines are to avoid bugs with some browsers | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
</IfModule> |