Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Page Errors and Conditionally Loading Javascript

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43291
    seansean11
    Participant

    Hey Everyone,

    My javascript usage on websites that I typically create is minimal, so I’m not an expert on best practices. On my portfolio site http://www.seanmichael.me, I have all of my custom javascript compiled into one file that loads on every page of the site. I noticed that when looking at the site with developer tools, on anything other than the “About” page, it is logging a bunch of errors. The reason for this is that there is some js specific to the “About” page that loads on every page. It bothers me to see these errors every time that I view the site with developer tools. So, I guess my question is this: What is best practice? Do these errors matter, and if they do, what would be the best practice for conditionally loading this js?

    Thank You,

    Sean Michael

    #127684
    seansean11
    Participant

    Thanks @JoshBlackwood. Just out of curiousity though, becuase this has come up before, are these errors harmful towards performance?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.