How to draw file in gz compressed HTML?

1

I'm starting to use gzip, I compress a JS file but when I call it in HTML, the error in the console.     NO HTML

<script src="/presencial/includes/jorge_includes/all/js/main.js.gz/main.js"></script>

The folder is as follows: The functions of the file are not recognized in the console.

    
asked by anonymous 02.02.2018 / 15:33

1 answer

1

GZIP unpacking files is part of the HTTP / 1.1 protocol that is not used by browsers to load local files. So I guess the short answer is no. Sorry!

You can use unzipped files or unzip them before loading the Web page or running an HTTP daemon (web server) on the local machine that serves files to the Web browser.

Reference:

I hope it helps

    
02.02.2018 / 15:48