Adding "welcome safari user" to your web page

Jump to First Reply
Posted:
in Genius Bar edited January 2014
How can I add welcome safari logo onto my web page?

Comments

  • Reply 1 of 2
    You can do it with either PHP or JavaScript by sniffing out the user agent.



    Code:


    <script language="javascript" type="text/javascript">

    <!-- if (navigator.userAgent.indexOf('Safari') != '-1') {

    document.write("Welcome Safari user!")

    } //-->

    </script>







    BTW, Google is your friend.
     0Likes 0Dislikes 0Informatives
  • Reply 2 of 2
    it's the exact same code for JS AND PHP?!



    cool
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.