Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Bogdan Matei
HTML source minimized
October 29, 2012 3:17 PM
Answer

Bogdan Matei

Rank: New Member

Posts: 2

Join Date: October 2, 2012

Recent Posts

Hello everyone,

Can someone tell me why a page has the html source not minimized and the rest of the pages have the html source minimized? I have a problem with jQuery on one of the pages (the first page after login). The problem appears only on this page. The same JS code appear on all the pages, so there are no problems with the code.

I use the latest version of Liferay 6.1 CE, with a theme developed by me.

Thanks.
Hitoshi Ozawa
RE: HTML source minimized
October 29, 2012 3:25 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

I'm not understanding your question clearly. Pages in liferay are generated by jsp scripts and are not minimized but content of Web Content portlet is minimized because the editor (CKeditor) minimizes it when saving.

How are you loading jquery? Are you including js files in theme, navigation, per page, or in Web Content? If you've added in Web Content and several Web Content portlets in a page, it may not work properly.
Bogdan Matei
RE: HTML source minimized
October 29, 2012 3:35 PM
Answer

Bogdan Matei

Rank: New Member

Posts: 2

Join Date: October 2, 2012

Recent Posts

Thanks for your quick replay.

jQuery and jQueryUI are called in the header of each page.

I was speaking about this type of minifing:
 1<html>
 2<head>
 3<title>Example</title>
 4<script>
 5window.alert("example");
 6</script>
 7</head>
 8<body>
 9Example of content
10</body>
11</html>


vs

1<html><head><title>Example</title><script>window.alert("example");</script></head><body>Example of content</body></html>


i hope i was more specific now. On the first page after an user logins, my source (CTRL+U in Chrome/Firefox) is shown like in the first example. On the rest of the pages, the code is like in the second example. If i access any page with the ?strip=0 parameter in the address, then i get the "Illegal token" error as well. Otherwise, everything it's ok.

My question is: how can i disable the developer mode on the page that hasn't the html source minimized.

If you still don't understand, please let me know and i can provide you the address of my portal to test.
Anonymous
RE: HTML source minimized
October 29, 2012 4:12 PM
Answer

Anonymous

try adding strip=0&js_fast_load=0 to your url to view the un minimized code.