Charpane Avatar image keeps reloading
Moderator: Public Forum Moderators
Charpane Avatar image keeps reloading
I noticed there that every time you spend an turn the avatar picture reloads. Could the avatar not just load at login and save on server side resources?
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Interface Ideas
Every time you spend a turn, the entire charpane reloads, but any images in there are (should be) cached by your browser and loaded from there rather than requested from the server. At least, that's what I see. What makes you think the avatar is being reloaded from the server every time?
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Charpane Avatar image keeps reloading
I just realised that the original topic for this was in the pre-alpha forums, which are now read only, so it's no surprise I didn't get any responses.
Anyway, I happened to be looking over Elljae's shoulder while she was playing Paradox yesterday (I do that sometimes, I'm creepy like that), and noticed that the avatar image certainly did appear to be reloading from the server every time the charpane refreshed. In other words, instead of the image appearing instantly each time the charpane reloads, it was appearing blank and then loading as if it was a brand new, uncached image.
That was using Firefox 2.
So I ran a few tests under different browsers, monitoring the server logs all the while, and discovered that:
- Firefox 3 doesn't reload the image
- Firefox 2 doesn't either (very odd)
- Firefox 1.5 doesn't
- Internet Explorer 6 does reload the image
- Internet Explorer 5.5 does
- Safari 3.1 (Windows) does not
- Opera 9.51 does not
I don't have IE7 installed here at work, but I'll install it later and test that too.
As a matter of interest, here are some (slightly edited) log samples:
Using Firefox (any version):
[23/Jul/2008:09:49:50 +1000] "POST charpane.php HTTP/1.1" 200 7563
[23/Jul/2008:09:49:51 +1000] "POST charpane.php HTTP/1.1" 200 7563
[23/Jul/2008:09:49:57 +1000] "POST charpane.php HTTP/1.1" 200 7563
[23/Jul/2008:09:49:58 +1000] "POST charpane.php HTTP/1.1" 200 7563
[23/Jul/2008:09:49:58 +1000] "POST charpane.php HTTP/1.1" 200 7563
Using Internet Explorer 6:
[23/Jul/2008:09:52:28 +1000] "POST charpane.php HTTP/1.1" 200 7615
[23/Jul/2008:09:52:28 +1000] "GET /paradoxdev/phpThumb/phpThumb.php?src=share/images/avatars/jaH2WJqFCMD8KQcd3vw0Z516LmeyVAzt.gif&w=150&h=150&iar=1&f=gif HTTP/1.1" 200 12982
[23/Jul/2008:09:52:30 +1000] "POST charpane.php HTTP/1.1" 200 7615
[23/Jul/2008:09:52:30 +1000] "GET /paradoxdev/phpThumb/phpThumb.php?src=share/images/avatars/jaH2WJqFCMD8KQcd3vw0Z516LmeyVAzt.gif&w=150&h=150&iar=1&f=gif HTTP/1.1" 200 12982
[23/Jul/2008:09:52:31 +1000] "POST charpane.php HTTP/1.1" 200 7615
[23/Jul/2008:09:52:31 +1000] "GET /paradoxdev/phpThumb/phpThumb.php?src=share/images/avatars/jaH2WJqFCMD8KQcd3vw0Z516LmeyVAzt.gif&w=150&h=150&iar=1&f=gif HTTP/1.1" 200 12982
You get the idea.
Anyway this raises some interesting questions:
1. Why does this happen?
2. Why did it happen on Elljae's Firefox 2 and not mine (or on any version of FF I tested)?
3. Can I do anything to prevent it?
Further research is definitely needed, because continuous reloading of images is an amazing way to blow hell out of the monthly bandwidth allowance, and looks ugly too.
Deo, what browser do you use?
Anyway, I happened to be looking over Elljae's shoulder while she was playing Paradox yesterday (I do that sometimes, I'm creepy like that), and noticed that the avatar image certainly did appear to be reloading from the server every time the charpane refreshed. In other words, instead of the image appearing instantly each time the charpane reloads, it was appearing blank and then loading as if it was a brand new, uncached image.
That was using Firefox 2.
So I ran a few tests under different browsers, monitoring the server logs all the while, and discovered that:
- Firefox 3 doesn't reload the image
- Firefox 2 doesn't either (very odd)
- Firefox 1.5 doesn't
- Internet Explorer 6 does reload the image
- Internet Explorer 5.5 does
- Safari 3.1 (Windows) does not
- Opera 9.51 does not
I don't have IE7 installed here at work, but I'll install it later and test that too.
As a matter of interest, here are some (slightly edited) log samples:
Using Firefox (any version):
[23/Jul/2008:09:49:50 +1000] "POST charpane.php HTTP/1.1" 200 7563
[23/Jul/2008:09:49:51 +1000] "POST charpane.php HTTP/1.1" 200 7563
[23/Jul/2008:09:49:57 +1000] "POST charpane.php HTTP/1.1" 200 7563
[23/Jul/2008:09:49:58 +1000] "POST charpane.php HTTP/1.1" 200 7563
[23/Jul/2008:09:49:58 +1000] "POST charpane.php HTTP/1.1" 200 7563
Using Internet Explorer 6:
[23/Jul/2008:09:52:28 +1000] "POST charpane.php HTTP/1.1" 200 7615
[23/Jul/2008:09:52:28 +1000] "GET /paradoxdev/phpThumb/phpThumb.php?src=share/images/avatars/jaH2WJqFCMD8KQcd3vw0Z516LmeyVAzt.gif&w=150&h=150&iar=1&f=gif HTTP/1.1" 200 12982
[23/Jul/2008:09:52:30 +1000] "POST charpane.php HTTP/1.1" 200 7615
[23/Jul/2008:09:52:30 +1000] "GET /paradoxdev/phpThumb/phpThumb.php?src=share/images/avatars/jaH2WJqFCMD8KQcd3vw0Z516LmeyVAzt.gif&w=150&h=150&iar=1&f=gif HTTP/1.1" 200 12982
[23/Jul/2008:09:52:31 +1000] "POST charpane.php HTTP/1.1" 200 7615
[23/Jul/2008:09:52:31 +1000] "GET /paradoxdev/phpThumb/phpThumb.php?src=share/images/avatars/jaH2WJqFCMD8KQcd3vw0Z516LmeyVAzt.gif&w=150&h=150&iar=1&f=gif HTTP/1.1" 200 12982
You get the idea.
Anyway this raises some interesting questions:
1. Why does this happen?
2. Why did it happen on Elljae's Firefox 2 and not mine (or on any version of FF I tested)?
3. Can I do anything to prevent it?
Further research is definitely needed, because continuous reloading of images is an amazing way to blow hell out of the monthly bandwidth allowance, and looks ugly too.
Deo, what browser do you use?
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Charpane Avatar image keeps reloading
Update: I installed IE7 on my PC, and noted that the problem does not occur there.
I did have some confusing moments, however, because after installing IE7, suddenly IE5.5 and 6 stopped exhibiting the behaviour (I'm running them all on the same PC with this utility: http://tredosoft.com/Multiple_IE).
After further testing, however, it turns out that IE 5.5 and 6 will only have a problem initially, but on doing a page refresh (using the browser's "Refresh" button), the problem goes away for the remainder of that session and only comes back after restarting the browser.
Because THAT makes sense. Got to research this more.
I did have some confusing moments, however, because after installing IE7, suddenly IE5.5 and 6 stopped exhibiting the behaviour (I'm running them all on the same PC with this utility: http://tredosoft.com/Multiple_IE).
After further testing, however, it turns out that IE 5.5 and 6 will only have a problem initially, but on doing a page refresh (using the browser's "Refresh" button), the problem goes away for the remainder of that session and only comes back after restarting the browser.
Because THAT makes sense. Got to research this more.
Re: Charpane Avatar image keeps reloading
I seem to be saying this in a lot of threads....... What oh what have i started....!
Post Script; it's happening to me on firefox 2.
Post Script; it's happening to me on firefox 2.
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Charpane Avatar image keeps reloading
I've still not been able to replicate this on Firefox 2, despite trying a number of different things. My FF2 install is unmodified, but the modular nature of the browser means you guys could have any number of extensions and configuration changes that I don't have.
In any case, I found this page, which gave me some settings to try in Apache and which seem to have done the trick (on Internet Explorer at least) here. While I can't modify the Apache server config on our host (grumble), I should theoretically be able to put together a simple .htaccess file, upload it to the server tonight, and the problem *should* go away.
Assuming (ruh-roh):
- Our hosting provider has the mod_expires module loaded into Apache; and
- The problem in Firefox that I can't replicate is caused by the same thing as in IE.
I'll do it tonight when I get home and see how we go.
EDIT: Interestingly enough, this fix does absolutely nothing about the flickering drop-down menus in IE, even though the article would suggest that it does. That's a separate issue entirely, and one that's not going to be as easily fixed. If you're really keen, you can read this page for more on that one.
In any case, I found this page, which gave me some settings to try in Apache and which seem to have done the trick (on Internet Explorer at least) here. While I can't modify the Apache server config on our host (grumble), I should theoretically be able to put together a simple .htaccess file, upload it to the server tonight, and the problem *should* go away.
Assuming (ruh-roh):
- Our hosting provider has the mod_expires module loaded into Apache; and
- The problem in Firefox that I can't replicate is caused by the same thing as in IE.
I'll do it tonight when I get home and see how we go.
EDIT: Interestingly enough, this fix does absolutely nothing about the flickering drop-down menus in IE, even though the article would suggest that it does. That's a separate issue entirely, and one that's not going to be as easily fixed. If you're really keen, you can read this page for more on that one.
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Charpane Avatar image keeps reloading
Or it might have something to do with this thing that I found in the "about:cache" page in Firefox:
Key: http://www.paradoxthemusical.com/phpThu ... ar=1&f=gif
Data size: 70800 bytes
Fetch count: 2
Last modified: 2008-07-24 13:48:50
Expires: 1970-01-01 11:00:00
See the "Expires: 1970..." thing? In addition to the fix above, which is still valid, I'll have to have another look at the phpThumb config to see if that's doing something silly.
EDIT: This is a symptom, not a cause
Key: http://www.paradoxthemusical.com/phpThu ... ar=1&f=gif
Data size: 70800 bytes
Fetch count: 2
Last modified: 2008-07-24 13:48:50
Expires: 1970-01-01 11:00:00
See the "Expires: 1970..." thing? In addition to the fix above, which is still valid, I'll have to have another look at the phpThumb config to see if that's doing something silly.
EDIT: This is a symptom, not a cause
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Charpane Avatar image keeps reloading
There's nothing obvious in the phpThumb config but you'll be pleased to know I've finally seen the problem happening in Firefox 3!
Also tested the Apache config changes mentioned earlier and saw the following:
Before changes
Expires: 1970-01-01 11:00:00
After changes
Expires: 2008-08-23 14:28:09
Looks promising.
Also tested the Apache config changes mentioned earlier and saw the following:
Before changes
Expires: 1970-01-01 11:00:00
After changes
Expires: 2008-08-23 14:28:09
Looks promising.
Re: Charpane Avatar image keeps reloading
Just so you know, in case its relevant I'm running FF 2.0.0.16
-
- Developer
- Posts: 3396
- Joined: Wed Jun 20, 2007 12:41 am
- Location: Melbourne, Australia
- Contact:
Re: Charpane Avatar image keeps reloading
I've put the change into (proper) dev and tested ok, so I've uploaded it to production. Guys, please let me know if the problem is still occurring.
Re: Charpane Avatar image keeps reloading
Looks good to me so far no problems here