Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Caching can make it really fast, and this is good if you expect your website to change often (e.g. due to comments).

Otherwise static is 100% the way to go, if only to reduce how much code to deploy.



sort by: page size:

Er, so they rolled their own custom caching system?

Isn't caching one of the first recommended ways to improve the performance of, well, any mostly-static content site?


Which does make sense, since it's a constantly updated site-- regenerating all of the files (to update "what's new" lists and such) each time an article is written would be major overkill.

While I'm sure you guys already do this, proper caching can have a similar effect to a completely static site in terms of performance.


Cached per browser, though, which is significantly different than cached per request.

Even if you're caching/serving static content efficiently it still adds load to a server.


Aside from wholly static sites, I can't imagine a sensible app/caching setup where that wouldn't be worth making dynamic.

Even for static sites, you could cheat with a touch of Javascript.


I don't understand. Why not start with caching, then do all those things you mentioned when the site bogs down again? It'll be after all the same queries, the same rendering etc. post-cache; the same technique to improve them will work in the presence of cache.

So why not start with caching, especially if it buys you a large chunk of time to prepare the other stuff?


I read this a lot how people say caching should be a last resort, but it really depends on what you are doing. Many times caching can be the easiest thing to implement on certain things.

I have done sites that have a signup page that have a lot of dynamic statistics on that page... I could have spent plenty of time optimizing the calls, but it is far easier to just cache the whole thing, and it will be faster. Clearing the cache is usually not nearly that bad either.


If you're just slinging static HTML, there's really not that big of a difference, and if it's a frequently accessed resource where a difference might be expected to matter, it will be cached regardless.

once it's cached though, loading new pages or new data is trivial.

It really depends on the use case- if I'm navigating my banking website, I would prefer a longer load time up front if it made it navigating between accounts really fast. If I'm checking my power bill, I'm probably only going to view one page so I just want it loaded ASAP


Just need to set up caching. No reason not to.

Edit: Static caching.

Edit2: Wow, well, :(. Glad I'm out of that world now though.


A pretty basic write up. Static caching is standard these days. The article doesn't help with speeding up today's dynamic sites.

This is how caching works in the real world. Everywhere. For a CMS delivering mostly static data this is a perfectly fine way to do it.

What? Server rendered content is infinitely more cacheable, maybe I'm not understanding what you're saying.

In the boring old days we just did it all on the server and used the semantics of HTTP to handle caching ... it worked great.


The article is about full page caching. How's that different than static content?

Or you could use a caching strategy, like enabling cache in apache.

I should have put caching also helps if you can't produce static stites via the application (i.e. some shopping cart software), not just wordpress.

I guess if you dont have css or javascript/other subresources that stay constant, caching is less important.

Isn't the point that dynamic content is changing and you don't want to cache it? What would be a good cache time for HN for instance?

So what's the thought process for choosing between that and cached dynamic pages? First visitor doesn't have to pay latency--serving a stale page while caching new one also works.

Static sites are trivially cacheable. Caching gets cheaper per request the higher the volume.
next

Legal | privacy