Fóruns

Início » Liferay Portal » English » 2. Using Liferay » General

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
Bogdan Matei
HTML source minimized
29 de Outubro de 2012 15:17
Resposta

Bogdan Matei

Ranking: New Member

Mensagens: 2

Data de entrada: 2 de Outubro de 2012

Mensagens recentes

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
29 de Outubro de 2012 15:25
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7990

Data de entrada: 23 de Março de 2010

Mensagens recentes

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
29 de Outubro de 2012 15:35
Resposta

Bogdan Matei

Ranking: New Member

Mensagens: 2

Data de entrada: 2 de Outubro de 2012

Mensagens recentes

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.
Anônimo
RE: HTML source minimized
29 de Outubro de 2012 16:12
Resposta

Anônimo

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