Template caching issue CSS

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Sep 24, 2013 7:46 am
Reply with quote
Report this post
Hi,

I have applied caching on our live website http://www.cycloongroep.nl. I have got comments from visitors that there is no lay-out at the first visit of the website there is no layout. Only after a refresh the website shown with the correct CSS lay-out. I had applied caching on several locations:

1. Caching options GavickPro Publisher template
2. Caching in Joomla (conservative file)
3. Caching htaccess
4. Gzip compression

Steps taken to resolve the issue:

1. Removed the template.
2. Re-installed template from scratch
3. Disabled Joomla caching and cleared cache folder
4. Removed caching options from htaccess
5. Disabled Gzip compression
6. Cleared browser cache

This did not resolve the issue at first load the page source shows this as template CSS (left out other non template CSS links).

Code: Select all
<link rel="stylesheet" href="/cache/gk/ee6d12bad285e5a0be04cd2e83fffd01.css.php" type="text/css" />


After a refresh of the page the page source shows the correct CSS links and CSS lay-out is applied correct.

Code: Select all
<link rel="stylesheet" href="<template_path>/css/k2.css" type="text/css" />
<link rel="stylesheet" href="<template_path>/css/normalize.css" type="text/css" />
<link rel="stylesheet" href="<template_path>/css/layout.css" type="text/css" />
<link rel="stylesheet" href="<template_path>/css/joomla.css" type="text/css" />
<link rel="stylesheet" href="<template_path>/css/system/system.css" type="text/css" />
<link rel="stylesheet" href="<template_path>/css/template.css" type="text/css" />
<link rel="stylesheet" href="<template_path>/css/menu/menu.css" type="text/css" />
<link rel="stylesheet" href="<template_path>/css/gk.stuff.css" type="text/css" />
<link rel="stylesheet" href="<template_path>/css/style1.css" type="text/css" id="gkCSSstyle1" />
<link rel="stylesheet" href="<template_path>/css/typography/typography.style1.css" type="text/css" id="gkCSSTypographyStyle1" />
<link rel="stylesheet" href="<template_path>/css/typography/typography.iconset.style1.css" type="text/css" id="gkCSSTypographyIconsetStyle1" />
<link rel="stylesheet" href="<template_path>/css/override.css" type="text/css" />


Any idea where to look next? I'm also about to open an support ticket at our hosting provider to see if the htaccess cache options messed things up.
User avatar
Fresh Boarder

GK User
Tue Sep 24, 2013 9:47 pm
Reply with quote
Report this post
The website is blank or just there is no CSS ? Maybe it is just caused by your server response ? Did you try to restore website on localhost and check the problem ?
User avatar
Platinum Boarder

GK User
Wed Sep 25, 2013 9:40 am
Reply with quote
Report this post
Hi,

I can not reproduce this at our local server. I have opened a support ticket with our hosting provider. They pointed me to a support page on their wiki explaining they are using caching using Varnish. To excluded this as an possible problem I disabled this from the .htaccess

## No Varnish Cache
Header Set Cache-Control "max-age=0, no-store"

I quick check using http://web-sniffer.net/ is showing that caching with Varnish is disabled
Cache-Control: max-age=0, no-store
Pragma: no-cache
Server: PCX/No-Cache

Some forum messages which are pretty similar
1. http://www.gavick.com/forums/security-a ... 17294.html
2. http://www.gavick.com/forums/121/proble ... 12370.html

I'm wondering why there is a link to a cache folder in the page source while all caching at Joomla, Gavick template, htaccess and serverside is disabled when the CSS is not loaded:
<link rel="stylesheet" href="/cache/gk/ee6d12bad285e5a0be04cd2e83fffd01.css.php" type="text/css" />
User avatar
Fresh Boarder

GK User
Wed Sep 25, 2013 11:37 am
Reply with quote
Report this post
It looks like some problem with your hosting if everything is fine on localhost you need resolve this issue with your provider.
User avatar
Platinum Boarder

GK User
Wed Sep 25, 2013 10:41 pm
Reply with quote
Report this post
Hi,

It seems indeed more like a caching issue.

When i visit a random page from my browser like http://www.cycloongroep.nl/locatie with an empty browser cache the page is shown with the correct CSS lay-out. When I clear my browser cache and visit the main page http://www.cycloongroep.nl it is not loading the CSS layout. Conclusion: the problem only seems to occur at the main page.

At the first visit of the main page the only template CSS loaded is:

<link rel="stylesheet" href="/cache/gk/ee6d12bad285e5a0be04cd2e83fffd01.css.php" type="text/css" />

When I refresh my browser the main page looks good. There is no caching what so ever in Joomla it has all been disabled and the cache directory is purged. Our hosting provider is using Varnish a server side cache but this has been disabled at the .htaccess file as they pointed me out to.

Steps to prove a caching problem:

Log in to Administrator part Joomla
Changed the template to Joomla default atomic standard
Delete cache in Joomla
Delete Expire cache at Joomla
Log out of admin
Closed browser
Purged browser cache (Safari)
Visit www.cycloongroep.nl

It is showing the Publisher template again without CSS!
On a refresh of the browser the Atomic template is shown!

Our hosting provider has not been helpful until now and we are in the middle of an campaign to get new members and a large promotion activity coming up in a week in our home town. If this continues the only logical solution would be to change the DNS entry so that the website is loaded from my personal VPS where we develop our website and where it is working.

Thanks for your help so far bkrztuk
User avatar
Fresh Boarder

GK User
Fri Sep 27, 2013 9:27 am
Reply with quote
Report this post
Hello,

Been digging the web directory and found some directories with plugin files which has been removed from Joomla extension manager. Removing them did not resolve the issue will check database later.

Plugins/system
- gavickExtCache
- plg_gkcache
- plg_gkextmenu
- plg_gkmodulelinks
- plg_gk_opengraph
User avatar
Fresh Boarder

GK User
Fri Sep 27, 2013 8:19 pm
Reply with quote
Report this post
First of all when the cache is enabled it is created once so no matter when it is first time page load or refresh the cache file is the same. If something goes wrong anything was working until cache expired. Please just check with firebug or some other developer tools whether when site is loading (without CSS) what you can see on CSS list and just check this file. It may be also related with your server response time, file is just not loaded. This issue you can test using pingdom tools http://tools.pingdom.com/fpt/
User avatar
Platinum Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.