Results 1 to 5 of 5

Thread: JavaScript code (SymError, etc) added to page when uplaoding to server

  1. #1
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default JavaScript code (SymError, etc) added to page when uplaoding to server

    Hey

    Every time I load a page to a server and then view the source code, there is some JavaScript code that I didn't write myself, it was just added.

    I have always had this and it didn't bother me since I thought it was normal, but I noticed that many pages don't have it, so there must be something with mine.

    There is a piece of code added to the head section and one after the html closing tag. They look like this:
    Code:
    <script language="JavaScript">
    <!--
    
    function SymError()
    {
      return true;
    }
    
    window.onerror = SymError;
    
    function SymInitWinOpen()
    {
      if (SymRealWinOpen == null)
         SymRealWinOpen = window.open;
      return SymWinOpen;
    }
    
    function SymWinOpen(url, name, attributes)
    {
      return (new Object());
    }
    
    var SymRealWinOpen;
    window.open = SymInitWinOpen();
    
    //-->
    </script>
    Code:
    <script language="JavaScript">
    <!--
    
    var SymRealOnLoad;
    var SymRealOnUnload;
    function SymOnUnload()
    {
      window.open = SymWinOpen;
      if(SymRealOnUnload != null)
         SymRealOnUnload();
    }
    
    function SymOnLoad()
    {
      if(SymRealOnLoad != null)
         SymRealOnLoad();
      window.open = SymRealWinOpen;
      if (SymRealOnUnload == null)
      {
         SymRealOnUnload = window.onunload;
         window.onunload = SymOnUnload;
      }
    }
    
    function SymInitWinOnload()
    {
      if ( SymRealOnLoad == null )
         SymRealOnLoad = window.onload;
       return SymOnLoad;
    }
    
    window.onload = SymInitWinOnload();
    
    //-->
    </script>

    Id doesn't seem to appear when I validate the code but it's there if I view the source or save the page.

    What I'd like to know is: What is it? Why does it appear? What does it do? Do I need it? If no, how do I get rid of it?

    Thanks for your help!
    Last edited by Snookerman; 02-13-2009 at 08:06 PM. Reason: Resolved

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Yahoo servers write some script to pages. Do you have your own server or are you using one? In a yahoo page I worked on the code didn't show up when I edited just when I hit view source on the live page. It did say it came from the server but maybe you have a different one that doesnt?

    Code:
    </html><!-- text below generated by server. PLEASE REMOVE --><!-- Counter/Statistics data collection code --><script language="JavaScript" src="http://us.js2.yimg.com/us.js.yimg.com/lib/smb/js/hosting/cp/js_source/whv2_001.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.webhosting.yahoo.com/visit.gif?us1234534188" alt="setstats" border="0" width="1" height="1"></noscript>

  3. #3
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I've seen this on pretty much all the pages I've written so far. I've used mostly web servers (one.com, 110mb.com, etc) and also local servers (municipality server). It happens when I upload with IE's ftp, with most popular FTP:s and with 110mb:s file manager. From what I've seen so far, it's not dependent on the server or the ftp service so I'm guessing it's my computer. I run XP sp3 and I have Norton 360:s firewall.

    Oh, by the way, I see this code when I view DD:s or Google's source code as well.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You're running Norton Internet Security. Norton likes to insert such things into downloaded pages.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. The Following User Says Thank You to Twey For This Useful Post:

    Snookerman (02-13-2009)

  6. #5
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You're right, it's Norton:
    http://service1.symantec.com/SUPPORT/nip.nsf/0/f497e345525fa9e488256dbf007118ac?OpenDocument

    Apparently, it's needed for the ad blocking and can be avoided by turning off the ad blocker. They don't really say what it does, though, or if there's a way to get rid of it without turning off the ad blocker.

    I think I'll just ignore it, I prefer getting rid of ads.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •