[jQuery] Re: low hanging newbie fruit for you to snack on

2007-04-05 Thread stylo~

There are problems with IE and headers on GETs, Klaus. The timestamp
is flawless and easy. See here for example: http://www.enja.org/david/?p=25



[jQuery] Re: low hanging newbie fruit for you to snack on

2007-04-04 Thread Karl Rudd


Responses inline.

On 4/4/07, stylo~ [EMAIL PROTECTED] wrote:

An option to add a timestamp to NOT cache ajax GETs is what I meant.
It would be very helpful as an option.


*shrug* Easy enough to add. Stick an extra key/value into your params.

Using the example at
http://docs.jquery.com/Ajax#ajaxSend.28_callback_.29 as a base:

$(#feeds).load(feeds.html,
 { limit: 25, nocache: (new Date()).getTime() },
 function() { alert(The last 25 entries in the feed have been loaded); }
);

Or if you're using $.ajax() you could add it automatically by setting
up a beforeSend callback.


I build most my stuff for newer browsers and with progressive
enhancement in mind. Unless you need to support IE  6.0 or some of
the older Netscapes, it shouldn't be too much of an issue.



Well, what exact check are you doing before applying jquery?


Almost no checks actually. If I come across something that is
particularly quirky under Safari or IE 5.5 I usually do something
like:

if( $.browser.safari || ($.browser.msie  /MSIE
(5\.[5-9])|6/.test(navigator.userAgent)) ) {
 // ...
}


It will apply it to any browser. Even for example if you're letting in the new
Safari/Konq/Opera maybe it dies on some obscure jquery call and is
left hanging.


Right, which is why I test on all the browsers in the projects specs.
Thankfully most of our projects are IE = 6, Firefox = 1.5, Safari =
2, and I usually test in the latest version of Opera.


Need to know the exact bugs to prevent that. Maybe I
misunderstand but I thought some new browsers were failing parts of
the test suite.


I don't keep up with that much. As far I as I know there are a few
minor quirks with some browsers.


I'm especially worried about ie 5.5 - yes, I know not
supported so a bit off base here - and I could block it from jquery
entirely myself but maybe I don't need to for what I'm doing.


:) Test it and see.


If I knew where it and especially new browsers fail I could plan. Looks
like the know issues page is not really used. Any tips?


:) If you find a bug, file a bug report/issue. jQuery is pretty darn
stable but it's still growing in quality, you can help that quality,
just like the rest of the community. Remember this is open source, if
you use it and find something wrong, try to make it right. :)


Btw, can anyone suggest a good check for ie6+ and other new browsers?


Take a look at:

 http://www.alterform.com/resources/jqbrowser-2


That might be noted in the docs as a best practice or maybe even
built into jquery as a variable to set so it just returns the old
sorry, you're a loser sort of thing for old browsers?


:) Probably best to leave what to do to the programmer. There are just
too many possibilities and conditions to work through to automatically
decide it won't run.

Karl Rudd


[jQuery] Re: low hanging newbie fruit for you to snack on

2007-04-04 Thread stylo~

 *shrug* Easy enough to add. Stick an extra key/value into your params.

of course, just found it strange it wasn't an option because a common
problem and solution going back years.

 Right, which is why I test on all the browsers in the projects specs.
 Thankfully most of our projects are IE = 6, Firefox = 1.5, Safari =
 2, and I usually test in the latest version of Opera.

I'm on windows so no safari, and no ie5.5 either. Guess I could try
everything on those standalone browsers but a known issues page per
browser would be good.

 Remember this is open source, if
 you use it and find something wrong, try to make it right. :)

no doubt, though you wouldn't want my code in there :-) I should
submit the timestamp option for GET's as a bug, though.

 :) Probably best to leave what to do to the programmer. There are just
 too many possibilities and conditions to work through to automatically
 decide it won't run.

That's why I suggested an option. Then easy to protect yourself
entirely from early browsers rather than hunt for ways to check and
code it in yourself.

Thanks for the link but looks like overkill. I'll have to hunt for an
object check. You know, if not x, then probably will have issues with
jquery. createElement is bit lowball. If anyone has a suggestion...

Thanks!



[jQuery] Re: low hanging newbie fruit for you to snack on

2007-04-04 Thread Klaus Hartl


stylo~ schrieb:

no doubt, though you wouldn't want my code in there :-) I should
submit the timestamp option for GET's as a bug, though.


I think it's not that easy. jQuery also supports If-Modified in some way 
and maybe an automatic cache killer would interfere with that.




-- Klaus


[jQuery] Re: low hanging newbie fruit for you to snack on

2007-04-04 Thread Klaus Hartl


stylo~ schrieb:

I think it's not that easy.


I believe it is. Used it for years. Other APIs do it too, I recall.


Whatever. I'm still not sure, if the ifModified option would still work 
as expected if you add an automatic cache killer to every GET request.



-- Klaus