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:
- recieve request , recognize default route
- 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
Post a Comment