How to handle large may html/js files?

lamquangki

New Member
I am working on HTML/JS based reports that should consist of one file. The current report is therefore 500 kB but this works quite well. However when you want to see the source code in Chrome it may freeze. A new report I am working on contains even more data and is currently around 1.5 MB. It is more or less impossible to see the source code in Chrome and I am afraid that it could cause trouble on slow devices.Any advise? Best practices? I have googled and searched through Stackoverflow but I couldn't find anything about size limits or about html/js code layout suggestions for easier Browser digestion. (I know from other languages, C++ for instance, that there exists hints how to make large files better digestable for the compiler, resulting in much faster compilations.)Edit: The current report's code size is by 99% HTML. (Tables) The tables are afterwards beautified with Datatables. Removing all JS code unfortunately makes no difference. By the way, I have experimented with removing whitespaces (1.5 MB -> 1.1 MB) and also loading data from array instead of storing them in hard-coded html \[code\]table\[/code\], \[code\]tr\[/code\], \[code\]td\[/code\] elements (1.5 MB -> 1.6 MB) but performance characteristics did not change.It's static files and the problem also occurs locally.
 
Back
Top