Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Bogdan Matei
HTML source minimized
29. Oktober 2012 15:17
Antwort

Bogdan Matei

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 2. Oktober 2012

Neue Beiträge

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. Oktober 2012 15:25
Antwort

Hitoshi Ozawa

Rang: Liferay Legend

Nachrichten: 7949

Eintrittsdatum: 23. März 2010

Neue Beiträge

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. Oktober 2012 15:35
Antwort

Bogdan Matei

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 2. Oktober 2012

Neue Beiträge

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.
Anonym
RE: HTML source minimized
29. Oktober 2012 16:12
Antwort

Anonym

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