FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » including CSS & JS on only pages that need that CSS & JS
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: including CSS & JS on only pages that need that CSS & JS [message #175624 is a reply to message #175623] Wed, 12 October 2011 10:19 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 10/12/2011 1:03 AM, paris2venice wrote:
> On Oct 11, 6:51 pm, Jerry Stuckle<jstuck...@attglobal.net> wrote:
>> On 10/11/2011 8:48 PM, paris2venice wrote:
>>
>>
>>
>>> Jerry, I don't get it. What did I say that led you to believe I was
>>> doing anything else except what both you and PointedEars describe
>>> above? I'm not faulting you -- I obviously did not communicate
>>> effectively with the HTML comments I used.
>>
>>> My include files are nothing but pure HTML. Thus, I'm not mixing the
>>> DOCTYPE with CSS and never have. I've been creating websites almost
>>> since the inception of the web (1995) so I do know what I'm doing and
>>> I certainly don't need to read a book on HTML or CSS. PHP? Yes. But
>>> if what I asked was so simple, there wouldn't be 33 posts already.
>>
>>> Thanks very much to everyone who contributed. I sincerely appreciate
>>> your efforts to help.
>>
>> As you said in your very first post in this thread:
>>
>> <?
>> php require_once './css.php'; /* css.php contains
>> doctype, meta& css needed universally */
>> ?>
>>
>> Look at your own comment.
>
> I did acknowledge my miscommunication. I should have written 'css
> links'. However, it *was* just a comment and I didn't think anyone
> would misunderstand my meaning and I certainly didn't think anyone
> would think I mixed my DOCTYPE and CSS.
>

"Just a comment"? Comments are important in code - but incorrect
comments are worse than no comment at all.

And you'd be surprised what some people do.

>
>> Additionally, .css files should not be named .php (they don't contain
>> any PHP code). Neither should they have DOCTYPE, META or anything else
>> not CSS. And you shouldn't include() them - you should LINK to them.
>
> What's on the left side of an extension is kind of a personal choice,
> isn't it? It can be whatever I want it to be. To be honest, I don't
> think I'll ever give credit to anyone anywhere for exceeding my own
> filename conventions. Remember, it was just a comment. I don't even
> have a file named css.php and, if I did, that would be my personal
> preference.
>

Yes and no. For the left of the '.' you should have some conventions to
help keep things straight. And in larger multi-programmer projects you
will generally be told what the file names will be.

But I wasn't referring to what's on the left - I was referring to the
extension, which does mean something. And incorrect comments are worse
than no comments at all.


>
>> And it is simple. But unfortunately there are a few trolls who frequent
>> this group all too regularly. Many of the posts are from them.
>>
>> Also, it really doesn't matter how long you've been doing it. You could
>> have been doing it wrong for the last 15 years just as easily as you
>> could have been doing it right.
>>
>> And your comments at least indicate you've been doing it wrong.
>
> It indicates nothing. They're comments.
>

If that's your attitude about comments, I wouldn't want to be anywhere
around anything you code.

>
>> And BTW - if you have been doing it for that many years, then you should
>> understand why having dozens of css files is not necessarily good.
>> Often times one css file performs better.
>
> Go to the top 100 major sites on the Internet and tell me if you find
> one that has only one CSS file. If you find just one, I'll go along
> with your idea.
>
>

You've got one of the top 100 major sites? If so, great. Otherwise,
you're comparing apples and oranges.

But you've already shown you don't want to learn. You just want to be
validated and will argue with anyone who disagrees with you.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: .htaccess vs PHP header(location:)
Next Topic: How to redirect user based on user country?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 15:20:37 GMT 2024

Total time taken to generate the page: 0.13508 seconds