3369 Views 8 Replies Latest reply: Feb 3, 2010 10:06 AM by Mr Mark
And here I have a perfect example. I have built a couple of CSS web pages that will not display in Safari. These pages are so simple, I'm just not sure what the problem could be.
The page will be blank when you load, but you can still view the source code. Just weird.
I had this problem on my pages, but I believe I've just identified what the problem was for me. My page validated fully.
In my script I had
So out of historic cut and paste I'd acquired an opening comment, and then at the end had not closed the comment.
Firefox and IE ignored this, presumably having some code to handle this, whereas both Chrome and Safari were intermitent - an initial load of the page might or might not load, but then switching between one page and another typically got the page to load, then a refresh caused a blank page.
There was an interesting further clue which was that although viewing page source showed the whole page, using the develop ~ show error page did not show a complete page, just the opening <body> tag.
The faulty script was in the head section, yet the body tag showed up along with the closing html tag but nothing else, even though there was a chunk of vanilla code.
So, try checking your (obsolete) comment markers in styles and scripts and strip them out to see where that takes you.
Just been doing some further reading on this issue.
The summary is:
Don't use inline style sheets and script as you hit issues with the handling of comments. If you must, then you need to be careful as those tricky little comments that nobody knows why they are there cause problems.
I think what is happening here is that Firefox and Internet Explorer are deciding to follow the "What is in the script stays in the script" anything in a script block is CDATA logic, but Safari and Chrome, perhaps due to backwards compatibility are a bit confused and sometimes honouring the start of comment as an HTML comment and sometimes not (perhaps due to caching?). I'd say it is a Safari bug because it is inconsistent, even though it is malformed HTML.
FWIW, I turned off 'block html refreshing' in the Safari menu and this alleviated my particular blank page problem, which affected only a small number of sites that I access. In the past, pesky loading issues were sometimes caused by SIMBL workarounds like Saft, which (in earlier versions at least for me) wreaked havoc that was hard to track down.