In Firefox I often open logs from our CI server. Usually these have few hundred kB, but sometimes these can be up to several gigabytes in size. In this case, Firefox gets stuck (all tabs) and I have to wait few minutes until it processes the Back button press.

Naturally, I don't want to read through such pages (I rather ssh to the server and read them using better tool such as less). The server may not properly inform about the page size in headers, the logs are updated via AJAX when the test is running.

Is there any setting/plugin which would block downloading/rendering the pages which are over certain size/after timeout? Or warning me that the page is pretty large, if it can't process it in chunks.

  • I know of no plugin that would do this. If you have the knowlege you might be able to make one yourself. Sounds like changing your tool might be easier though. – Ramhound Jan 17 '14 at 17:12

presumably, the log files are presented as text files & you are fetching them via FTP or some such?

So the browser is behaving as expected since the file it is loading is enormous and must fully load before the browser knows it has the end of it - unlike an HTML page where rendering can start early if enough information is available.

The way round this is to have more "smarts" on the server. You need a log browser that is capable of doing a "tail" on the log file. It should then refresh every few seconds.

You could roll this yourself using PERL, PHP, Python or Node.JS very easily if you are allowed to add such things to a web server with access to the log files. There are also packages available for all of those languages.

I don't think you can do this in the browser though as you don't get enough control. You could run a local proxy that cut off the connection after a set amount of data or time though. Try Fiddler if you are on Windows.

  • No, it's regular HTML page accessed via HTTP, and the rendering starts right away. I don't see into Firefox internals, but it's getting stuck when trying to process the page (build DOM, render, whatever). – Radim Vansa Jan 21 '14 at 9:35
  • Setting up a proxy and breaking the connection could be a way, although not the best. – Radim Vansa Jan 21 '14 at 9:36
  • I agree not the best but whatever is delivering the log as HTTP is trying to deliver the whole file at once which is crazy. Better to do as I suggest and use something to create your own web page that refreshes perhaps every few seconds or manually as needed but that simply adds new lines to the web page on refresh rather than reloading the page. This is how I've done it with Node.JS in the past. – Julian Knight Jan 24 '14 at 12:49
  • There are a few ideas in on of my early Node experiments. – Julian Knight Jan 24 '14 at 12:51

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.