views:

1651

answers:

4

I am the web guy for a large TV station. Our site is cached by Akamai. Pages render perfectly in our testing environment (not cached) and on our "origin" page (again, not cached), but when they are viewed on our live environment (the cached site), they do not render exactly the same as how I coded them. Maybe it's a tiny bit of spacing, maybe it's a CSS element (backgrounds especially) not displaying, and worst of all, forget all about floating DIVs. It's insane how much table design I have to do because of the failure to float.

Does anyone else have experience with caching like this? Is there a tool I can use to see the changes in rendering?

There is no one I can go to for support, because the company doesn't believe the problem exists. Please assist if you can.

The site is built on a VB.Net backend that I do not have access to. I only have access to the front end.

A: 

Download all files as static files from development and then from production. And use a tool like WinMerge to see the differences.

Also does this problem go away if you do CTRL-F5 to refresh the browser?

Nick Berardi
+2  A: 

Are stylesheets, Javascript files etc all loading correctly from Akamai?

Can you save a copy of a page retrieved directly from your "origin" server and a copy saved using Akamai, then use diff to look for changes?

And, most importantly, have you asked Akamai about it? It's not really a programming question :)

David Precious
Unfortunately, I can't tell for sure how Akamai is loading things because I'm just the front-end guy. But that means anything I do is the most visible, and we can't just go to the GM and say "it's corporate's fault". I will try your suggestion, though.
A: 

Perhaps Akamaia isn't seeing the updated versions of your CSS files that are <link />'d in your HTML code? It might be a good idea to embed a version number in the URL so that when you release an updated version of the HTML, it's always going to ask Akamai for a new version of the CSS as well (this applies to images as well I suppose).

Theoretically, Akamai should recognize updated caching headers that your web server sends but I've never worked at a job where we didn't have to have some counter-measures in place to make sure that we could force Akamai to refresh its cached version.

Brian Phillips
Most of it isn't related to changes in the CSS; when I use CSS to lay out individual pages I usually do it at the page level, not in a link tag. And we do have a cache-buster, but that doesn't solve the problem. First thing I tried.
+1  A: 

I've been working on sites behind Akamai and can honestly say they don't mess with your code, so that's not the issue. It's more than likely one of the following:

You have a cache latency issue - You updated your html and css, and one of the two updated while the other is still cached by Akamai or using timestamps to increment dependent files. There are several solutions here including making sure to clear cache via Akamai's control panel as well as more programmatic ways of coding. Headers can also be used though not really a preferred way.

Absolute URL's - Relative url's are best when testing on multiple environments to ensure your pointing everything to the same environment.

This is definitely an environment issue not an Akamai issue.

raccettura