Author | Topic: CXP line length should be > 20K | |
---|---|---|
Nestor G. Torres | CXP line length should be > 20K on Sun, 14 Dec 2014 11:28:44 +0200 Hi, While trying to use html compression I ran into a problem. The CXP engine fails if a html Line length exceeds 20k. Compressing HTML removes all carriage returns, extra spaces and line feeds as well as all comments making the source one continuous line. My current compressed web page is 32k which will not run within cxp. Also is there any way of testing for a screen width within cxp. Currently I am redirecting my web application by testing the following: cHttp_User_Agent:=Upper(::HttpRequest:GetVariable("HTTP_USER_AGENT")) If Rat("MOBILE",cHttp_User_Agent) > 0 .or. Rat("ANDRIOD",cHttp_User_Agent) > 0 ::StarLite:Data:User_Agent:="mobile" ::Session:User_Agent:="mobile" ::HttpResponse:redirect("./starlitemobi.cxp") Else ::StarLite:Data:User_Agent:="pc" ::Session:User_Agent:="pc" Endif Kind regards, Nestor | |
Roger Donnay | Re: CXP line length should be > 20K on Sun, 14 Dec 2014 18:52:12 +0100 Are you saying that the entire CXP file cannot be greater than 20k? I have some that are close to that and may exceed it in the future. Nestor G. Torres wrote in message news:1d2d4ceb$7577be92$24096c@news.alaska-software.com... >Hi, > >While trying to use html compression I ran into a problem. The CXP >engine fails if a html Line length exceeds 20k. Compressing HTML removes >all carriage returns, extra spaces and line feeds as well as all >comments making the source one continuous line. My current compressed >web page is 32k which will not run within cxp. > >Also is there any way of testing for a screen width within cxp. > >Currently I am redirecting my web application by testing the following: > > cHttp_User_Agent:=Upper(::HttpRequest:GetVariable("HTTP_USER_AGENT")) > If Rat("MOBILE",cHttp_User_Agent) > 0 .or. >Rat("ANDRIOD",cHttp_User_Agent) > 0 > ::StarLite:Data:User_Agent:="mobile" > ::Session:User_Agent:="mobile" > ::HttpResponse:redirect("./starlitemobi.cxp") > Else > ::StarLite:Data:User_Agent:="pc" > ::Session:User_Agent:="pc" > Endif > > >Kind regards, >Nestor | |
Nestor G. Torres | Re: CXP line length should be > 20K on Mon, 15 Dec 2014 06:18:34 +0200 Hi Roger, No I'm not. This only applies if you have removed all the line feeds and carriage returns from the source cxp file; in effect making the file just one contiguous line of more than 20k. Using html compression techniques removes all line feeds and carriage returns and other none essential comments and spaces. My html file shrinks from 54k to 32K when compressed but then I can not use it within a CXP environment otherwise I can. Kind regards, Nestor On 2014/12/14 07:52 PM, Roger Donnay wrote: > Are you saying that the entire CXP file cannot be greater than 20k? > I have some that are close to that and may exceed it in the future. > > Nestor G. Torres wrote in message > news:1d2d4ceb$7577be92$24096c@news.alaska-software.com... >> Hi, >> >> While trying to use html compression I ran into a problem. The CXP >> engine fails if a html Line length exceeds 20k. Compressing HTML removes >> all carriage returns, extra spaces and line feeds as well as all >> comments making the source one continuous line. My current compressed >> web page is 32k which will not run within cxp. >> >> Also is there any way of testing for a screen width within cxp. >> >> Currently I am redirecting my web application by testing the following: >> >> cHttp_User_Agent:=Upper(::HttpRequest:GetVariable("HTTP_USER_AGENT")) >> If Rat("MOBILE",cHttp_User_Agent) > 0 .or. >> Rat("ANDRIOD",cHttp_User_Agent) > 0 >> ::StarLite:Data:User_Agent:="mobile" >> ::Session:User_Agent:="mobile" >> ::HttpResponse:redirect("./starlitemobi.cxp") >> Else >> ::StarLite:Data:User_Agent:="pc" >> ::Session:User_Agent:="pc" >> Endif >> >> >> Kind regards, >> Nestor | |
Andreas Herdt | Re: CXP line length should be > 20K on Mon, 15 Dec 2014 13:40:27 +0100 Hi Nestor, If I understand correctly then you do not compress the html page, you are compressing the CXP page. Compressing HTML is usefull to reduce amount of data to be transferred from Web Server to Web Client. However, the html send back to the web client stems from the CXP page execution. For the time being CXP pages do not support minimizing HTML output - which is a nice feature request. With my best regards, Andreas Herdt Alaska Software -------------------------------------------------------------------- Technical Support: support@alaska-software.com News Server: news.alaska-software.com Homepage: http://www.alaska-software.com WebKnowledgeBase: http://www.alaska-software.com/kbase.shtm Fax European Office: +49 (0) 61 96 - 77 99 99 23 Fax US Office: +1 (646) 218 1281 -------------------------------------------------------------------- "Nestor G. Torres" wrote in message news:1d2d4ceb$7577be92$24096c@news.alaska-software.com... > Hi, > > While trying to use html compression I ran into a problem. The CXP engine > fails if a html Line length exceeds 20k. Compressing HTML removes all > carriage returns, extra spaces and line feeds as well as all comments > making the source one continuous line. My current compressed web page is > 32k which will not run within cxp. > > Also is there any way of testing for a screen width within cxp. > > Currently I am redirecting my web application by testing the following: > > cHttp_User_Agent:=Upper(::HttpRequest:GetVariable("HTTP_USER_AGENT")) > If Rat("MOBILE",cHttp_User_Agent) > 0 .or. > Rat("ANDRIOD",cHttp_User_Agent) > 0 > ::StarLite:Data:User_Agent:="mobile" > ::Session:User_Agent:="mobile" > ::HttpResponse:redirect("./starlitemobi.cxp") > Else > ::StarLite:Data:User_Agent:="pc" > ::Session:User_Agent:="pc" > Endif > > > Kind regards, > Nestor > |