On Wed, Dec 29, 2010 at 1:13 AM, Jean-Sebastien Delfino
<[email protected]> wrote:
> On 12/28/2010 03:50 AM, Simon Nash wrote:
>>
>> Jean-Sebastien Delfino wrote:
>>>
>>> Hi all,
>>>
>>> The Javascript client code used in Tuscany's 'Web 2.0' apps like
>>> samples/store doesn't seem to work with MS Internet Explorer.
>>>
>>> To reproduce the problems start the samples/store app and point IE to
>>> http://localhost:8080/store.
>>>
>>> I tried two versions of IE with both Tuscany 2.0-beta1 and 1.6.1:
>>> - IE6 v6.0.2900.2180.xpsp_sp2_rtm.040803-2158 just hangs using 100% cpu.
>>> - IE8 v8.0.6001.18702 doesn't refresh the cart as you shop.
>>>
>>> Are others seeing these problems with IE too?
>>
>>  >
>> I have noticed the same issue and I believe I reported it to the list
>> about 2-3 years ago, but I can't find the message now.
>>
>> I have tried a selection of other browsers as well. Firefox, Safari
>> and Chrome seem to be OK. I had problems with IE and Opera.
>>
>> Simon
>>
>
> IE still represents a big chunk of the Web browser market, so you may want
> to fix these two problems for people trying to deploy Tuscany Web apps.
>
> I found a fix for the hang problem with IE6. See my fix to the C++ runtime
> in SVN r1053559 [1]. Removing the 'type=feed/entry' parameter from the
> 'application/atom+xml' media type of ATOM docs makes IE happier.
>
> The refresh problem is caused by IE not checking with the server for updates
> of cached content. I had to fix similar issues with the C++ runtime long
> time ago.
>
> Here's what the Java runtime returns for an ATOM feed:
> HTTP/1.1 200 OK
> Content-Type: application/atom+xml;type=feed
> ETag: "Feed96897824"
> Transfer-Encoding: chunked
>
> ... XML content ...
>
> Here's what the C++ runtime returns, which works with IE:
> HTTP/1.1 200 OK
> Date: Wed, 29 Dec 2010 07:44:58 GMT
> Server: Apache
> Expires: Tue, 01 Jan 1980 00:00:00 GMT
> ETag: 8ac80137de06d087626be8cfc4fcae58
> Content-Length: 1149
> Keep-Alive: timeout=5, max=100
> Connection: Keep-Alive
> Content-Type: application/atom+xml
>
> ... XML content ...
>
> IIRC, the combination of Date and Expires forces IE to revalidate its cache
> and check for updates instead of blindly using the cached content. The ETag
> header is then used to check with the server for updates using a conditional
> GET. The server will return a '304 Not Modified' status if the cached
> content is up to date and can be used, or the new content with a '200 OK'
> status.
>
> For that to work, you'll also need to change AtomBindingListenerServlet to
> calculate the ETag from the feed content (or a representation of its state,
> like a modification time or version for example).
>
> An alternative may be to change the Javascript client code to use HTTP
> Cache-Control headers. I didn't try that at the time as I was looking for an
> approach that also worked for page GETs without Javascript, as well as
> various HTTP caching proxies.
>
> More info on these HTTP headers there [2].
>
> Hope this helps.
>
> [1]
> http://mail-archives.apache.org/mod_mbox/tuscany-commits/201012.mbox/%[email protected]%3e
> [2] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
> --
> Jean-Sebastien
>

I'll take a look at this today, but unfortunately I'll be driving
blind to certain extent as I don't have a IE environment to test.
Could you help validating the fix once I apply the fix on the Java
runtime ?

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Reply via email to