Problem with stylesheets
Permalink
Hi,
I have just installed concrete5 and starting to learn it. Looks wonderful so far.
I am trying to import an old site design into concrete5 and have a couple of problems.
1. I am making changes to the css stylesheet and it seems concrete5 is caching the stylesheet. I have tried to disable and clear cache from the Dashboard but still I cannot get the stylesheet to refresh properly when making changes.
Thanks in advance.
I have just installed concrete5 and starting to learn it. Looks wonderful so far.
I am trying to import an old site design into concrete5 and have a couple of problems.
1. I am making changes to the css stylesheet and it seems concrete5 is caching the stylesheet. I have tried to disable and clear cache from the Dashboard but still I cannot get the stylesheet to refresh properly when making changes.
Thanks in advance.
Perhaps your browser is caching your style sheets and needs to be cleared to reflect your new changes.
Does not help.
I have tried both with Mozilla Firefox 3.6 and Google Chrome 5 with clearing the cache from the browser over and over again.
I have tried both with Mozilla Firefox 3.6 and Google Chrome 5 with clearing the cache from the browser over and over again.
Connecting to your site through a web proxy is the only other thing I can think of (at the moment) that would cause that issue.
Have you ever seen any of the CSS changes you have made appear as final output to your browser or do they appear after awhile like they are being cached? What CSS files are your working on? Also, you could try activating another theme and re-activating the theme you are working on? I'm not a theme designer... Sorry...
Yes, the changes appear randomly but it can take a long time.
This is why I was supposing that it is caching the content because the changes appear in time.
Just makes it really hard to design when you can't get the changes by refreshing the page.
I am working with the main stylesheet which is attached to the theme.
This is why I was supposing that it is caching the content because the changes appear in time.
Just makes it really hard to design when you can't get the changes by refreshing the page.
I am working with the main stylesheet which is attached to the theme.
You could try activating another theme and re-activating the theme you are working on via the dashboard. Does that get an immediate display of your changes? I am wondering if part of the "theme" layout is being stored somewhere in a php variable or datastore and needs to be refreshed.
Finally found the culprit.
It seems like Byethost, which I was using to test concrete5 is using somekind of cache also.
I moved the stylesheet file off the Byethost server and to a different server and linked the stylesheet there.
Now when refreshing the page the changes are shown right away.
Thanks for your patiance.
It seems like Byethost, which I was using to test concrete5 is using somekind of cache also.
I moved the stylesheet file off the Byethost server and to a different server and linked the stylesheet there.
Now when refreshing the page the changes are shown right away.
Thanks for your patiance.
OK this may sound a little snippy and is not meant to be. It is a noob thing and even though I have designed several themes, I sometimes still do this and it can get frustrating.
Are you in fact updating the proper folder/file? If you are putting the new file changes in a yoursite.com/concrete/themes folder you wont see the changes. If your putting them in the yoursite.com/themes folder you may not see it if the theme your using is installed via a package. I know it can get confusing so just double check.
Are you in fact updating the proper folder/file? If you are putting the new file changes in a yoursite.com/concrete/themes folder you wont see the changes. If your putting them in the yoursite.com/themes folder you may not see it if the theme your using is installed via a package. I know it can get confusing so just double check.
Thank you, that was a good tip. Didn't notice there even was a theme folder in the concrete-folder.
But I think I am updating the proper folder. Because I don't have a theme folder at all for my own theme in concrete/themes but only in themes/.
And this seems to be the case also because:
1. I updated the stylesheet file and didn't get the updated styles.
2. I uploaded the stylesheet file to a different server and then updated default.php to point to the other server.
3. The stylesheet was updated.
So the stylesheet file was not updated but default.php was and they were in the same theme folder.
But I think I am updating the proper folder. Because I don't have a theme folder at all for my own theme in concrete/themes but only in themes/.
And this seems to be the case also because:
1. I updated the stylesheet file and didn't get the updated styles.
2. I uploaded the stylesheet file to a different server and then updated default.php to point to the other server.
3. The stylesheet was updated.
So the stylesheet file was not updated but default.php was and they were in the same theme folder.
Ah, good catch. I had forgotten about Zend, APC or eAccelerator PHP caches.
There may be an easy way to disable it. Find out what cache is running (phpinfo should tell you). If APC use this in your .htaccess:
php_flag apc.cache_by_default Off
php_flag apc.cache_by_default Off
Checked phpinfo but didn't find apc.cache in it.
Only this:
HTTP_CACHE_CONTROL max-age=259200
I think it has to be a cache issue with the server.
Because if I view the css source I cannot get it updated even though I hit F5 in it numerous times.
Only this:
HTTP_CACHE_CONTROL max-age=259200
I think it has to be a cache issue with the server.
Because if I view the css source I cannot get it updated even though I hit F5 in it numerous times.
Can you add this to the headers of your theme?
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
I wonder if there is a webproxy between you and your web host.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
I wonder if there is a webproxy between you and your web host.
Tried that and did not help.
I also contacted the host and they first asked me to refresh the source code several times and then they suggested deleting and re-uploading the file again.
I can even delete the css file from the server and no matter how many times I refresh the page with the link to the file, it still finds it.
And this seems to happen only with the css file.
I can update the website through CMS and for example change .php files on the server and the changes are instant.
But changes to the CSS are not updated.
I also contacted the host and they first asked me to refresh the source code several times and then they suggested deleting and re-uploading the file again.
I can even delete the css file from the server and no matter how many times I refresh the page with the link to the file, it still finds it.
And this seems to happen only with the css file.
I can update the website through CMS and for example change .php files on the server and the changes are instant.
But changes to the CSS are not updated.
It is server cache issue.
I got a reply from Byethost that because they are offering the hosting for free, they are using some kind of cache.
They instructed me to refresh the source code in Firefox.
But since I am only using the server for testing use, it is not crucial. In a production server there should be no problem.
Glad the problem is not with concrete5.
I got a reply from Byethost that because they are offering the hosting for free, they are using some kind of cache.
They instructed me to refresh the source code in Firefox.
But since I am only using the server for testing use, it is not crucial. In a production server there should be no problem.
Glad the problem is not with concrete5.
I was hoping the Meta Tags would work. I would bet that Web Host is using Squid as n HTTP Accelerator via proxy to increase responsiveness and decrease workload on thier webserver. I would think that Squid would be smart enough to not cache anything on your pages, even CSS. I guess not. I am glad you got this "worked-around" :)