Author |
Topic: javascript client image headers (Read 829 times) |
|
Victorwss
Forum Full Member
Arimaa player #5012
Gender:
Posts: 14
|
|
javascript client image headers
« on: Mar 5th, 2010, 5:24pm » |
Quote Modify
|
Hi. I played some games with some invisible pieces in the javascript client. That really sucks. The reason is because sometimes the browser request for some image timeouts and so the browser does not render it. In the start of the game, this is not much a problem, because I can just refresh the page until it shows everything correctly. However sometimes, when the server is really badly overloaded, it may never work correctly. E. g.: In the first try it did not loaded the silver's cat. Refreshed the page, and this time the gold elephant does not shows up. Refreshed a third time and the board is not loaded. In the fourth time, the gold rabbits does not shows up. This is very bad. However, eventually all pieces (and the board) will show up and I can start to play. BUT, when the server is overloaded, sometimes the client misses the other player's move. When I suspect that this occurred, I need to refresh the page, and normally the opponent moved some time ago and my time is running. To make things worse, some pieces (or the arrows icons, or even the board image) does not renders correctly and I need to do the browser-refresh ritual until it shows up, or try to play in that state anyway, with the time running! In fast and blitz games specially, this is a disaster. I already had to unrate some games due to this problem and already blundered due to invisible pieces. So, at least for me, this problem is really annoying. I started to investigate this, and saw that the images contains a particular header: Quote: Cache-Control: max-age=3600 |
| The images used are static images and probably will never change, so this type of header is surprising. I think that forcing the browser to cache it always would be good. Further, the generated <img> tags does not have the alt attribute. The alt attribute would be very handy when the images does not shows up. And, if possible, the client should have a way to check automatically if the server already commited a possibly lost message without relying in the user refreshing the page. Though this may possibly overload the server even more.
|
« Last Edit: Mar 5th, 2010, 5:27pm by Victorwss » |
IP Logged |
|
|
|
Hippo
Forum Guru
Arimaa player #4450
Gender:
Posts: 883
|
|
Re: javascript client image headers
« Reply #1 on: Mar 7th, 2010, 4:53am » |
Quote Modify
|
Yes, I agree with both time-out and alt-tag to be issues. Having alt tags H for gold horse, d for silver dog ... would help much. One could even stop downloading images when having bad connection (I hope).
|
« Last Edit: Mar 7th, 2010, 4:56am by Hippo » |
IP Logged |
|
|
|
omar
Forum Guru
Arimaa player #2
Gender:
Posts: 1003
|
|
Re: javascript client image headers
« Reply #2 on: Mar 11th, 2010, 10:11am » |
Quote Modify
|
I think the cache control header might be a default value that the web server uses. I'm not explicitly setting that. I've made a note to add the ALT attribute to the IMG tags. Thanks for the suggestions.
|
|
IP Logged |
|
|
|
Hippo
Forum Guru
Arimaa player #4450
Gender:
Posts: 883
|
|
Re: javascript client image headers
« Reply #3 on: Mar 14th, 2010, 11:32pm » |
Quote Modify
|
When replaying game on xperia, I start loosing animal pictures and after a while I have board with alternate texts "Image". I hope the alternate tag will solve this problem. So I am looking forward for it. I thing EeMmHhDdCcRr would be ok as well as ge resp we ...
|
|
IP Logged |
|
|
|
Hippo
Forum Guru
Arimaa player #4450
Gender:
Posts: 883
|
|
Re: javascript client image headers
« Reply #4 on: Jan 31st, 2011, 6:37am » |
Quote Modify
|
I hope this feature proposal was not lost so I am popping it up ... . It allows replaying games started while connected without connection needed during replay. Especially usefull in underground.
|
|
IP Logged |
|
|
|
omar
Forum Guru
Arimaa player #2
Gender:
Posts: 1003
|
|
Re: javascript client image headers
« Reply #5 on: Feb 1st, 2011, 12:08pm » |
Quote Modify
|
I do have this in my todo list. I just looked into doing this, but it is not as trivial as I thought it would be. Can you remind me about this after the events are over.
|
|
IP Logged |
|
|
|
|