Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2012
    Posts
    13
    Thanks
    6
    Thanked 0 Times in 0 Posts

    HTML CSS and JS combined into one file.

    Hi,

    I have a automotive web page that runs on an industrial PLC web server. I have adopted the project and I note the HTML, JS and CSS items are all in one XX.HTM file instead of a HTM file for the HTML stuff, JS file for the functions and CSS sheet for the styles etc.

    The server can hold and is capable of accessing the separate files no problem, in fact, the demo from the manufacturer has a htm file and a JS file.

    Is this good / bad or no difference? The reason I ask is because we get some communication issues that don't seem to be tied to a specific function and i was wandering if the structure was influencing things here?

    Thanks in advance.
    Last edited by JS Newbie; 12-20-2012 at 01:57 PM.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,627
    Thanks
    0
    Thanked 646 Times in 636 Posts
    Best to keep them separate - that way you can reuse the css and JavaScript on other pages - also the code will be easier to maintain.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • Users who have thanked felgall for this post:

    JS Newbie (12-21-2012)

  • #3
    New Coder
    Join Date
    Dec 2012
    Posts
    13
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Ok Thanks.

    That seems to be the general opinion on the web too.


  •  

    Posting Permissions

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