I’m using a live Joomla site and I want to include a page_title.css inside the template, but I was wondering if I could just include the link even if the stylesheet doesn’t exist, without error messages or search engine penalties.
<link rel="stylesheet" type="text/css" href="page_title.css" />
If page_title.css didn’t exist there wouldn’t be any problems, right?
Search engines won’t typically care about CSS (or js) files or the like, so there should be no ‘penalty’ there.
On your web server, there will be the 404 errors for requests for CSS files that do not exist. Those could stack up to a fairly significant statistic. For someone like me, that would bother me, but maybe you don’t care as much.
(Per the comment added by ernie, note that there is also some server load associated with these 404 requests/responses)
As for the browser, it will try to load a non-existent CSS file, but no browsers will popup any error messages or anything of the sort. The rest of your styles will be applied properly, though.