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 #175587 is a reply to message #175579] Mon, 10 October 2011 12:30 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 10/9/2011 11:43 PM, Mr. B-o-B wrote:
> On 10/9/2011 6:54 PM, Jerry Stuckle cried from the depths of the abyss:
>
>>
>> None of which are a good idea. And so those who keep espousing these
>> crappy solutions (which are off topic in this newsgroup but there are so
>> many of them I will respond anyway):
>
> So just ignore them then :)
>

And spread crappy solutions like you continually provide? No, I'm here
to HELP people - not let them get your crappy advice.

>> And files should be included using link tags, not directly included in
>> the source file directly (unless they are specific to this page - in
>> which case there is no need for conditional includes). That way file can
>> be cached by the browser and/or routers between the web server and the
>> client, decreasing both network traffic and server load.
>>
>
> Again, my original post fits these specs:
>
> if (@isset $jerrys_css) {
> echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"jerry_css.css\"
> />";
> }
>
> Then just set $jerry_css = 1 when needed. Imagine that. You are not
> decreasing network traffic, not increasing server load, cache is
> irrelevant as it's only cached in the pages that need it, you are using
> .js/.css via link tags.
>
>

To quote you:

----if (@isset $javascript01){
put code here
}

if (@isset $javascript02){
put code here
}

if (@isset $css01){
put code here
}
etc....

----

Crappy advice.

--
==================
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: Sun Oct 20 19:24:57 GMT 2024

Total time taken to generate the page: 0.06262 seconds