SWI-Prolog / packages-pengines

Pengines: Prolog engines
11 stars 13 forks source link

Endless output with IE11 #28

Closed triska closed 7 years ago

triska commented 7 years ago

I have a web application that uses Pengines, and it works flawlessly with:

However, with IE11, I unexpectedly get an endless sequence of output events after visiting the page. In this concrete case, you see the problem immediately because the view port erratically jumps all over the page, and if you simplify the test case to a single fraction example, you see a boundlessly increasing sequence of formulas displayed.

Please simply visit the demo page with IE 11 to see the problem:

https://www.metalevel.at/rits/demo.html

The server uses the most recent version of Pengines and SWI-Prolog. You can also test this locally, please see RITS for more information.

I have checked this on a physical machine with IE11 installed, and can also reproduce the issue with the free IE11 VM using Virtualbox.

As far as I can tell, one of the issues seems to be that the same output event is simply repeated over and over by Pengines, leading (in this case) to more and more formulas being displayed on the screen.

triska commented 7 years ago

I found the reason: If you access Pengines via a proxy server, you must configure it to relay (at least) the Pragma header field so that IE11 works correctly.

Specifically, to make Pengines work together with Proloxy, I have now added the following definitions to my configuration file:

transmit_header_field(pragma).
transmit_header_field(cache_control).
transmit_header_field(expires).

This ensures that the header fiels Pragma, Cache-Control and Expires are relayed to the client.

I think it would be worthwhile to document this requirement in the description of Pengines.

JanWielemaker commented 7 years ago

Not sure this should be with Pengines. It is kind of obvious you don't want to cache Pengines interaction and the behaviour of HTTP proxies should consider the cache directives. It may cache itself if the headers allow that. If not, it should pass these headers along to allow further proxies and the client to take the appropriate decision.