Safari shows a blank page

Safari shows a blank page, no content, due to missing comment close in JavaScript.

Share This Post

I just ran into something odd and found all sorts of complex solutions (none of which worked for me), so I decided to post this case.

I’m creating a new version of an interface at work and tested with FireFox during development. When I opened it in Safari, all I got was the background image. No content at all. I Googled and several people reported having the same problem and said that clearing the cache would do the trick. It did not.

In the end, the issue was a missing ‘–>’ inside a script tag.

<script type="text/javascript"> <!-- // open a comment for older browsers - is this actually required still??
/* lots of JS here */

// There should be a close comment (-->)  here!
</script>

Safari, not finding the closing comment tag, simply considered all of the HTML to be commented out.

I hope this helps!

 

Book Suggestions:

 

More To Explore

Documentation
vinny

bbPress Notify (No-Spam) Documentation

bbPress Notify (No-Spam) Documentation The bbPress Notify (No-Spam) is a free plugin that lets you control who gets notifications of new Topics and Replies in

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.