symphonists / cachelite

Dead simple caching extension for the Symphony CMS. Uses the CacheLite library.
Other
19 stars 11 forks source link

Unstyled snapshot #28

Closed nathanhornby closed 9 years ago

nathanhornby commented 9 years ago

I'm pretty sure this is due to the Cachelite plugin, but I'm happy to be corrected.

I've installed it on a site we've just launched (stubbingtonark.org.uk) and on two occasions I've had reports of users seeing a completely unstyled page, which I've been able to confirm by visiting on a separate machine. Flushing the cache for the page fixes the issue.

I suspect that what's happening is that if the page is rendered and cached without the stylesheet (for what reason I don't know) then the cache will serve that unstyled page until it expires.

Is this something that anyone has seen before? Is there an obvious reason why an unstyled page could get cached?

Unfortunately it doesn't happen enough to be able to easily monitor it - it's only happened twice since installation yesterday out of many visits.

nitriques commented 9 years ago

Never saw this...

As a good rule of thumb, xsl must be deterministic in order for cachelite to work properly.

Nothing must be different in the html render for the same url. So no UA sniffing, no random. Use query string to customize the output if needed.

nathanhornby commented 9 years ago

That makes sense, I don't think we're doing anything funky like that.

I'll just keep an eye on it. We did have a cross-domain issue with www/non-www - this has since been resolved. Think that could have had an impact?

DavidOliver commented 9 years ago

If it does happen again, it might be worth seeing what your network inspector says about the CSS file, especially the response headers.

nathanhornby commented 9 years ago

Yea I kicked myself for not checking the inspector last time I sorted it!

nitriques commented 9 years ago

@nathanhornby The domain name is not part of the cache key... only $_GET values are, so it should not change a thing.

@DavidOliver's comment is right. Also, is your css file a real static file on disk ?

Also, using a proxy like Charles or Fiddler could help a lot.

nathanhornby commented 9 years ago

It is a real file on disk, yes.

The cross-site issue was with the local icon font (an issue I've seen many times before, yet always forget about) - but I don't believe CSS has an issue with cross-site stuff anyway, so I'd have been surprised if that was it - that's the only other issue we've had though.

I've certainly never seen this issue with Cachelite before; so I'm hoping it was just computers being computers.

Thanks for the Charles/Fiddler tip!

nitriques commented 9 years ago

@nathanhornby My pleasure!

And no css files do not care about cross domain stuff but fonts do.

so I'm hoping it was just computers being computers.

Me too! I've been having a bug where the site works everywhere, except at the client's office...

I'll close the issue for now. Please re-open/comment if you have more problems or infos.

nathanhornby commented 9 years ago

Sure no problem, I'll reopen if it crops up.

That's a good one, and that would be the machine that it does it on!

On 22 Apr 2015, at 17:13, Nicolas Brassard notifications@github.com wrote:

@nathanhornby My pleasure!

And no css files do not care about cross domain stuff but fonts do.

so I'm hoping it was just computers being computers.

Me too! I've been having a bug where the site works everywhere, except at the client's office...

I'll close the issue for now. Please re-open/comment if you have more problems or infos.

— Reply to this email directly or view it on GitHub.