Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: not2easy
Then the sidebar.php file might also have the line: <link rel="stylesheet" type="text/css" href="/css/master.css">
The homepage which uses a php inclues to suck in the sidebar.php will also have the line: <link rel="stylesheet" type="text/css" href="/css/master.css">
So when I read the source for my page from a browser I see sometimes dozens of references to loading master.css.
Is this a problem? Will these multiple reads slow the page down significantly? Is it worth the agravation of devising a method of recoding the whole site to remove this issue? I like having the css in each document for testing.
Any input would be appreciated.
<link rel="stylesheet" type="text/css" href="/css/master.css"> in your pages <head></head>.
As includes are rendered on the server, before the CSS is applied, there is no real point in adding it inline as well. Lucky for you it's a quick change to each include, not to dozens of pages :)
2) my real concern is that the css file that each of the 20 includes that make up a page references is being read in by the browser 20 times. So onload is the browser reading and caching the first instance and ignoring the additional 19 calls or is it reloading it and comparing the file 20 times for a single page load?
I'd create a test page with the css file in the head, and load the php includes into it.
I think it definitely makes sense to remove each call from the 'live' includes - it's doing you no favors :)
If that's the case then its probably not worth the work right now just to save on 19 lines of code.
Just wanted to make sure that it wouldn't be resulting in 19 extra http requests!