Comments (9)
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.
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.
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.
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.
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.
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.
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.
@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.
Original comment by [email protected]
on 26 Mar 2011 at 8:15
- Changed state: WontFix
from htmlcompressor.
Related Issues (20)
- a
- preserve-line-breaks causes StackOverFlow when consumed 2000 empty lines. HOT 1
- Velocity Version
- compressor replaces double spaces in urls and thus brokes the links HOT 1
- http://compilehtml.com/ not working anymore HOT 2
- javaScript wan't be compressed
- How to use the htmlcompressor? HOT 1
- [deleted issue]
- Unable to use latest closure compiler HOT 3
- how can i did not reduce spaces when it is in the input tag HOT 1
- removeSpacesInsideTags incorrectly removes space after some unquoted attributes HOT 1
- Unable to use closure HOT 2
- Extend HTML compressor to compress and combine external files
- Google Closure Compiler compiler.jar not found even though present
- one-line comment HOT 1
- styleTypeAttrPattern should also search for type="text/css"
- Add a --preserve-single-line-break option
- Update for JSP 2.2 HOT 2
- greedy simple attributes remove content for all attributes ending in "disabled" such as ng-disabled
- && in attributes breaks compression HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htmlcompressor.