Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Optimization of final HTML code
#3
I wasn't exactly about optimizations, but about "look".
In IntraWeb, IWBase__*.js or IWGecko __ *. Js file looks great.
I would like the main html code to be more "unreadable" (it gives a little professional look).

In my old Indy HTTP Server projects I used this simple code:

Code:
function OptimizeCode(const data: string): string;
var opt: TStringList; i: integer;
begin
Result := '';
opt := TStringList.Create;
opt.Text := StringReplace(data, #9, '', [rfReplaceALL]);
for i := 0 to opt.Count - 1 do Result := Result + opt.Strings[i];
opt.Free;
end;

For now, In IntraWeb I only use code to delete generator information:

Code:
procedure TIWServerController.IWServerControllerBaseMetaTag(
  ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
if AnsiLowerCase(AMetaName) = 'generator' then vMetaValue := '';
end;

But this optimization code could still be useful.
Reply


Messages In This Thread
Optimization of final HTML code - by TPiotr - 04-21-2020, 08:09 PM
RE: Optimization of final HTML code - by TPiotr - 04-24-2020, 10:01 AM
RE: Optimization of final HTML code - by TPiotr - 04-25-2020, 07:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)