You are here: Re: For Those On The Cutting Edge Of Web Design « All PHP « IT news, forums, messages
Re: For Those On The Cutting Edge Of Web Design

Posted by Oli Filth on 07/03/05 03:05

Onideus Mad Hatter said the following on 02/07/2005 22:33:
> On Sat, 02 Jul 2005 16:42:25 GMT, Oli Filth <catch@olifilth.co.uk>
> wrote:
>
>>>...and why are you blathering on about HTTP headers when in that other
>>>post you were yammering on about how you hated my date stamp
>>>method...I mean, DO YOU know how HTTP headers work?
>
>
>>What's the relationship between date-stamping a filename and HTTP headers?
>
>
> With HTTP headers you can set it not to cache anything, like nyah:
>
> Cache-Control: no-cache
>
> Which is essentially the same as date/time stamping individual file
> names...except that it gives you more control, with cache control it's
> everything in the page, all or nothing.

What the hell are you talking about? Oh right, you think that including
something like:

<META http-equiv="Cache-control" ...>

is an HTTP header? Firstly, it's not. And secondly, that doesn't control
the caching of images on the page, only the page itself.

I'm talking about *actual* HTTP headers, sent in the HTTP responses for
the images.

What's that phrase you like to use, "running at the mouth"?


>
>>>>And there I was expecting you to use the HTTP headers to influence
>>>>caching behaviour, like anyone who knows what they are doing. But then
>>>>you don't do you? So it is a javascript hack for you.
>
>
>>>A JavaScript hack, eh? *snicker* Actually doing what I did with
>>>JavaScript is not much different from modifying HTTP headers except
>>>you have more control in that you can precisely cache individual
>>>elements. With HTTP headers it's pretty much all or nothing.
>
>
>>Hmm, sounds like someone doesn't know how to use HTTP headers.
>
>
> Are you saying you can get precision control over individual file
> caching using HTTP headers?

Yes, see above.


>>>eval(logot+logoc)
>>>
>>>Hrmmm...nope, I don't see any dollar signs, kiddo, pretty sure that
>>>means they're INTEGERS...say it with me INTEGERS.
>
>
>>What do dollar signs have to do with anything?
>
>
> Well normally one would use a dollar sign to differentiate between a
> string and an integer.

Normally? Not that I've seen. ALthough it's perfectly allowable.


>>>Well of course it is you fuckin doorknob there's only one variable in
>>>their example. I mean if I type out eval(value); it's not gonna do
>>>anything. But if I throw in some more variables and a few more
>>>operands hey we can really start some shit!
>>>eval(you+are*a-fucking/idiot);
>>>
>>>There ya go, how do ya like that?
>
>
>>That's still one argument to the eval() function!!!!!
>
>
> ...after it's done doing whatever calculations are contained within
> it, yes.

Which has nothing to do with the eval() function itself. It's *exactly*
equivalent in every respect (even execution and evaluation order) to:

var foo = you+are*a-fucking/idiot;
eval(foo);


>>>Try it without the eval, stupid, see what happens. Oh hey, it fucks
>>>the whole site, fancy that!
>
>
>>Tried it, and it worked fine.
>>
>>If you want a simple example:
>>
>> var gimp = 15;
>> var bum = 20;
>> document.write(gimp + ' does not equal ' + bum);
>
>
> *tests the idiocy*
>
> Great, it works...although it makes no difference as far as speed so
> obviously it's nothing more than a programming style...which is why
> I'm not going to do it.
>
> I guess JavaScript is like IE in a lot of ways, you can program like
> shit and it's REAL forgiving. Most of us who engage in good
> programming practices would like a better distinction between our
> integers and our strings though.

In that respect, I'd agree with you. I come from a C/C++ background
where you have to be specific about your types. Languages with untyped
variables and implicit conversions work out more complicated to learn
than "stricter" languages, because you have to learn all the conversion
rules.

But if it bothers you, then use Hungarian notation (or something
similar) rather than pointless extraneous function calls. Because that
really is poor programming practice.


>>>Obviously to anyone who isn't STUPID I'm using eval to perform math on
>>>integers that are going to be read as a string once it's finished
>>>calculating them.
>
>
>>Umm, in Javascript you can concatenate an integer with a string, no
>>problem (see the example above). And if you're worried about evaluation
>>order, well that's what brackets are for.
>
>
> Yeah well you just go on ahead and do that, kiddo. Hell you can
> engage in all the piss poor programming practices you like...

See above.


--
Oli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация