Hi chaps, I've just done a new CSS version of my website, in php. It validates to xhtml strict. However, I get very odd behaviour in some peoples' IE6 browsers. The page would load ok, then immediately refresh and only load the first half of the page, then get stuck. Sometimes it refreshes continuously. On my machine, works fine in IE6, FF, Opera. On my friends' machine, works fine in FF, but not IE6. My dad's machine has IE6 and it doesnt work. However, I've asked 2 other friends and it works fine in IE6 on their machines. So it seems the problem occurs on some people's IE6 browsers. However the live site (current site, which uses tables, which I'm hoping to replace) works fine everywhere on every browser. One of the offending pages: http://test.dvd-subtitles.com/details.php?id=32338 Could there be something broken in my CSS/html/xhtml which could cause IE6 to behave erratically like this? The page passes xhtml strict validation by the way. Thanks in advance! Mat
I use Maxthlon (IE engine), and it kept flashing like it was 'redrawing' the page, about twice a second. All I could see was this google adsense <script type="text/javascript"><!-- google_ad_client = "pub-5905704442298061"; google_ad_width = 120; google_ad_height = 600; google_ad_format = "120x600_as"; google_ad_type = "text"; google_ad_channel =""; google_color_border = "003399"; google_color_bg = "FFFFFF"; google_color_link = "003399"; google_color_url = "008000"; google_color_text = "000000"; //--></script> Code (markup): Could it be this? google_ad_channel =""; I don't know adsense, so I am just guessing. I have come across pages once in a while that do what you describe, load then reload blank or half ways. I have also seen some other quircky things like that also.
Hi, thanks for the reply - I thought it might be Google's adsense too, as a result I removed the adsense code for a week. It's definitely not Adsense - the problem still occurred. Where can I get Maxthlon? I'm trying to find something that will reproduce the problem. It works fine on IE6 on my machine. Cheers, Mat
I had another look and tried to see in the bottom status bar of browser what was trying to load over and over. I could see the test.dvd and I think I saw search - well, I did see search! I couldn't read the whole url but it sure looked like it was calling a search spontaneously. Here is the home page for Maxthlon: http://www.maxthon.com/ Don't know if it is important, but this browser rocks. It has a button to 'view in gecko, tabbed browsing, lots - it is the #1 browser at Microsoft, according to their blog. It is heavy duty packed. There are some mighty fine plug-ins also. Avant is another browser that is very highly recommended, http://www.avantbrowser.com/, but I don't know if it will do the reloading trick, LOL Okay, enough! I should tell you I am on WinXP all updated, but this also happened to Maxthlon on WinXP 64 as well. Let's see if it the search! It must be auto-submitting or something
I confirm that flashes here too with IE6. I will try to remove code in the head element, perhaps some metas just to find the offending element.
mikmik, I have downloaded maxthlon and it does show the refreshing bug on my machine at last. Now I have a chance of fixing it Thanks! Mat
Right, I know what is causing the problem, no idea how to fix it. gzip compression is causing the problem: ini_set('zlib.output_compression_level', 1); ob_start('ob_gzhandler'); I have removed these two lines and replaced with just ob_start(). The pages now work in IE6 without continuous refreshing or freezing. Could you confirm? gzipping really speeds up the pages, so I want to find a way of making it work it. Ironically, my original site is also gzipped but works fine. I've read in places on the net that IE has a problem with gzipping CSS-heavy sites but I'm struggling to find any more info or a solution. Can anyone help? Thanks, Mat
Perfect! It is fast, also. I have read before about gzip difficulties with IE, but I've never tried to use it myself(gzip). How much difference does gzip make? Anyways, I just tried to look up your server on Netcraft to see if you are on Apache or IIS, but it didn't show. What type of server are you on? I found this: Then it says this: Here are some M$ (LOL) knowledgebase articles about http compression on Windows servers:http compression Also this: If you are on Apache: Compressing Web Output Using mod_gzip for Apache 1.3.x and 2.0.x has this - "In Apache, this can be achieved using a couple of different methods. Content Negotiation, which requires that two separate sets of HTML files be generated -- one for clients that can handle GZIP-encoding, and one for those who can't -- is one method. The problem with this solution should be readily apparent: there is no provision in this methodology for GZIP-encoding dynamically-generated pages." and also... When a request is received from a client, Apache determines if mod_gzip should be invoked by noting if the "Accept-Encoding: gzip" HTTP request header has been sent by the client. If the client sends the header, mod_gzip will automatically compress the output of all configured file types when sending them to the client. This is all way over my head, but I am just thinking that you could return gziped, or not, based on the user request (can't think of what the term is! - browser tag?)
Right, solved. Bit silly really - should have been obvious. As I'm using caching - ob_start()- I must use ob_end_flush() at the very end of my page, which I thought I was doing, however... I still had some commented-out html AFTER the call to ob_end_flush(). As I'd commented it out with <!-- -->, I thought nothing of it - but of course, the server still sends the text. Doh!!!!! Lesson - in future, check I havent got ANY output, commented-out or not, after the call to ob_end_flush(). Pages should be ok now. Can make a huge difference - all it does is compress the html output. Try your pages here: http://www.whatsmyip.org/mod_gzip_test/ Here's the output from my page: http://test.dvd-subtitles.com/browse.php is gzipped Original Size: 25 K Gzipped Size: 6 K Data Savings: 76% In terms of download time, 6k is a massive improvement over 25k. The page should take almost 4 times faster to load, plus a negligible amount of time for the browser to decompress the page. Compression level from 1 (lowest) to 9. Use compression level 1. There really isn't that much improvement between level 1 and 9, and its much less work for the server. Images can't be compressed, so if your site is image-heavy, it will make very little difference. Many thanks for all your assistance with solving my problem. Cheers, Mat