Live data from Hacker News

Website Performance Tutorials

code.google.com

11–15 of 15 posts

Re: Website Performance Tutorials

#11
post #6

What I really would like to see is an independent third-party which cares nothing about data mining (maybe the w3c) host commonly used scripts (e.g. jquery) on Akamai and minified/compressed; all the parameters to their optimum instead of the myriad of options people use. They'd be so many browser cache hits.

For those who don't care about giving Google their traffic data and aren't already aware of this, Google offers the previously described service.

http://code.google.com/apis/ajaxlibs/

Re: Website Performance Tutorials

#12
post #11
post #6

What I really would like to see is an independent third-party which cares nothing about data mining (maybe the w3c) host commonly used scripts (e.g. jquery) on Akamai and minified/compressed; all the parameters to their optimum instead of the myriad of options people use. They'd be so many browser cache hits.

For those who don't care about giving Google their traffic data and aren't already aware of this, Google offers the previously described service. http://code.google.com/apis/ajaxlibs/

The jquery one only has a 1 year expiry time...

Re: Website Performance Tutorials

#13
post #12
post #11

Earlier quoted context omitted.

For those who don't care about giving Google their traffic data and aren't already aware of this, Google offers the previously described service. http://code.google.com/apis/ajaxlibs/

The jquery one only has a 1 year expiry time...

What does that mean?

Re: Website Performance Tutorials

#14
post #7

I would expect something a lot more from google. All these ideas are way too elementary and some are just misguided. Advice like "crop your image"...come on. The misguided ones are things like "use single quotes instead of double quotes when printing in php since one does not look for variables in the string text". The is just misguided and is probably the last thing your should worry about. This is orders of magnitu…

I disagree; I thought the point about not copying variables in order to make the code look "cleaner" is a good point. I never considered that a malicious user might pass in 512kb worth of data into a textarea..

Re: Website Performance Tutorials

#15
post #12

Earlier quoted context omitted.

The jquery one only has a 1 year expiry time...

What does that mean?

When some server on the Internet gives your browser a file, it includes a metadata called an expiry header (actually, Expires:), which the browser is supposed to interpret as providing guidelines for caching. For example, if I tell you that this web page is good for until midnight tomorrow, and the user requests the same page later today, the browser can (but doesn't have to) serve the user the page out of the local cache, secure in the knowledge that I have told it I would not update the page until at least midnight tomorrow. Since this totally skips the HTTP request for the page the second time, it results in blazing bugs-in-your-teeth speed.

Saying JQuery's expiry time is 1 year in the future means that Google is telling browsers who get the JQuery script "Hey guys, you can rely on this being constant for a year, after that you'll probably want to ask for a new version." The poster above you apparently thinks this is suboptimal, because a user should be able to cache a particular version of JQuery for longer than one year. I think that it is irrelevant, since in actual practice almost no user agent will reliably persist a cache for a year, and 1 extra HTTP request a year isn't enough to worry about, anyway.

Post reply on HN