GithubHelp home page GithubHelp logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Sorry, it is not clear what is the problem here. Could you please provide exact 
piece of page source before and after a compression? 

Original comment by [email protected] on 9 Jun 2010 at 5:49

from htmlcompressor.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Google says stick this in your page
<!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var k='1466590057',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return 
c.substring(i+n.
length+1,j<0?c.length:j)}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime=
'
+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
</script>
<!-- End of Google Website Optimizer Control Script -->

That code is in a JSP that is being compressed using htmlcompressor taglib

When google loads the page it complains with something like
expected <!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var k='1466590057',d=document .....

found <!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var a='1466590057',b=document

Original comment by jeff%[email protected] on 17 Jun 2010 at 2:58

from htmlcompressor.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Do you have inline javascript compression on? If so you probably need to 
disable it for that piece of code as Google seems like doesn't like its 
javascript being recompressed.

Original comment by [email protected] on 17 Jun 2010 at 4:19

from htmlcompressor.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
Are you saying there is a way I can prevent the javascript from being 
compressed for this one section of my JSP and still compress any other 
javascript found in the JSP?

Original comment by jeff%[email protected] on 17 Jun 2010 at 4:22

from htmlcompressor.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
It compresses only code that you wrapped into compressor tags. So you can do 
something like this:

<compress:html compressJavaScript="true">
    <html>
    ...regular code that will be compressed....
</compress:html>

<!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
...
</script>

<compress:html compressJavaScript="true">
    ...rest of the page...
    </html>
</compress:html>

Original comment by [email protected] on 18 Jun 2010 at 1:38

from htmlcompressor.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
could you please add a feature for servlet filter? 

sometimes i want to compress javascript or css by any request.

I can join in to the develop list.i have write the code already based on your 
project.

Original comment by [email protected] on 19 Nov 2010 at 8:58

from htmlcompressor.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
by the way,i do know how to apllication a member for development.

Original comment by [email protected] on 19 Nov 2010 at 8:59

from htmlcompressor.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024
@cmings.chen If you could zip your code and send it to [email protected] I can 
take a look. Thanks. 

Original comment by [email protected] on 19 Nov 2010 at 4:44

from htmlcompressor.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 19, 2024

Original comment by [email protected] on 26 Mar 2011 at 8:15

  • Changed state: WontFix

from htmlcompressor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.