General / Posts /

Where should I upload the JS CSS and images files to the server

38
I am a novice in web design. Would you give me some hints on what location the JavaScript, CSS and HTML pages should be uploaded to on the web server?
Harrison  4 years ago   viewed: 30702    

1 Answer

12

It doesn't matter where you upload your js, css, html and images. It matters whether your links or file paths in your page(eg. HTML file) and CSS code are correct.

There are two ways to specify the paths. One is absolute, such as "/level1/level2/level3/myjs.js"

The other is relative, such as "level3/myjs.js"(assuming your page is located in level2).

If you are using relative path, you need to pay attention to the images specified in your CSS file. The relative image path in your CSS file should be relative to your CSS file location instead of your page location.  

Natalia   4 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question:
    • If your question is related to the General, click:

      Ask new question: General
    • Otherwise navigate to one of the following forum categories, and post your question there.

      ##