http - Web browsers fetching css and javascript files -


i think straightforward question, i'm having hard time finding specifics. in simplified world, let's suppose have 1 html file has references .js , .css files. browser sends http request , receives .html, , sees there dependencies , sends corresponding http requests .css , .js files. there special these secondary http requests? ask because have set simple http server, , when receives request '/' returns index.html, somehow browser has proper styling , scripts, although haven't configured in server handle requests these files. what's going on here? thanks.

well, subsequent paths url's pointing specific location on server, while '/' url not pointing specific. server will:

  1. recieve request , recognize default route
  2. try resolve (index.html in list of files use resolve route).

the url's js files on other hand, probably:

http://www.example.com/js/yourjsfilename.js 

when server retrieves request, in file system wwwroot\js\yourjsfilename.js. hope answers question, , understood correctly... also, explanation long comment ;)


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -