Flush HTML head

Hi Guys,

What command I should use to flush html head to client in my
layout.rhtml?

I’ve tried “$stdout.flush” but weird, the CSS total time seems to be
longer after using the flush.

Thanks!
Arthur

Arthur C. wrote:

What command I should use to flush html head to client in my
layout.rhtml?

I’ve tried “$stdout.flush” but weird, the CSS total time seems to be
longer after using the flush.

If this is a problem with Ruby On Rails (the web application framework),
it would be best asked on a Rails mailing list. This one is for Ruby
(the programming language).

I’m pretty sure that in any web framework, you’ll find that stdout is
not the socket connected to the client. In normal Rails request
processing, the whole response body is built before it starts being
sent back to the client. If you want to do low-level stuff like sending
progressive pages, look at the Rack API (which Rails now runs on top of,
and exposes as “Rails Metal”).

Thanks Brian! I’ve reposted the question to Rails.

Brian C. wrote:

Arthur C. wrote:

What command I should use to flush html head to client in my
layout.rhtml?

I’ve tried “$stdout.flush” but weird, the CSS total time seems to be
longer after using the flush.

If this is a problem with Ruby On Rails (the web application framework),
it would be best asked on a Rails mailing list. This one is for Ruby
(the programming language).

I’m pretty sure that in any web framework, you’ll find that stdout is
not the socket connected to the client. In normal Rails request
processing, the whole response body is built before it starts being
sent back to the client. If you want to do low-level stuff like sending
progressive pages, look at the Rack API (which Rails now runs on top of,
and exposes as “Rails Metal”).

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs