Jump to content

Why is there a long delay to see file changes?


Recommended Posts

Hi all,

 

Recently I've been doing a lot of editing to css files. I've noticed that it takes hours or even days to see a simple edit show up. Let's say I make a small change, such as adding margins to a block. I'll edit the file, save it, and upload it. I refresh my page and it still shows the old style. If I wait a few hours and come back, the changes then take effect. It seems to only have been happening recently.

 

I've tried turning force compile on, cache on, clearing browser, using different browsers...and there's still a horrible delay.

 

I even tried deleting the entire css file and viewing the page. It still loads as if the css file is still there. FireBug even states the style is coming from the deleted file, although it no longer exists in the directory.

 

Any suggestions on what could be causing this?

Link to comment
Share on other sites

well, by default its because browser "remember" old values, usually a hard refresh (ctrl+f5) solves the problem - with this you will se changes immediately.

 

But you said that you cleared browser cache... the problem is related to the CSS files only? or also for other stuff like template files modification etc?

Link to comment
Share on other sites

Hmm...I haven't tried enough with other files to be sure. So far I've only noticed it on css files. It makes it a pain to alter files since I can't see updates until hours later or the next day.

 

I'll try giving hard refresh a go and see what happens. Could it be server related? My host updates files immediately. If I upload or delete a file, it shows up right away. Is it possible for the server to have a cache setting as well?

Link to comment
Share on other sites

No, more than likely it is because of the headers sent with the files. Browsers cache files, headers have expiration dates on them. Just do a hard refresh, it is what everyone in the industry does.

Link to comment
Share on other sites

  • 6 months later...

well, by default its because browser "remember" old values, usually a hard refresh (ctrl+f5) solves the problem - with this you will se changes immediately.

 

But you said that you cleared browser cache... the problem is related to the CSS files only? or also for other stuff like template files modification etc?

 

I am having that same problem.

 

I can confirm that this is only related to the CSS files and not PHP or TPL files.

 

When I edit the CSS files, I have to wait one day to see the actual changes.

 

When I edit the TPL or PHP files, changes are happening straight away.

 

I did turn on "Force compilation"

I did clear my cache

I did try other browsers

I did do hard refresh

 

Nothing happens.

 

Funny because when I try to use CCC for CSS, I see the changes, but when I switch back to CSS, still no changes.

 

Anyone who knows what could be the issue?

 

 

*sry for posting twice  ;)

Link to comment
Share on other sites

As written before the problem is a caching issue. Perhaps your Server is caching due to big RAM-memory. If not, so clear all your domain-sessions on your browser.

 

If my Server is caching due to big RAM-memory, how do I disable/erase this?

 

I am quite sure that this has nothing to do with my browser, because I have tried from different computers and different browsers, clearing browsers and even re-installed them.

Link to comment
Share on other sites

  • 2 months later...

Why do you guys keep saying do a hard refresh? That this is the normal standard in the industry. A hard refresh does not work. Until the Prestashop software or database or whatever it is updates it still pulls from the old cached data. A hard refresh does not work.

 

I have the same issue. I make a change and then set to force compilation and turn off caching and refresh the page and the changes are reflected. I can then wait all day and turn off the force compilation and turn caching back on and my site still pulls in the old data.

 

It usually takes about 24 hours for the changes to update and reflect properly.

 

So people please stop saying a hard refresh solves this problem, it does not. It solves the problem for about 3 seconds, but does not in anyway solve the problem correctly.

Link to comment
Share on other sites

Hmm, or you could just clear you sites cached files too. There is a button in the later version of 1.5x to do that. But leaving your shop in the compile mode to detect changes works just as well too. 

Link to comment
Share on other sites

Open-up themes/<theme>/header.tpl file and find:

 

<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}" />
replace with:

 

<link href="{$css_uri}" rel="stylesheet" type="text/css" media="{$media}?v1" />
and increment "v1" each time you change CSS.
Link to comment
Share on other sites

Ok, so yes I know you can leave the prestashop in force compilation mode and turn of the smarty cache and the site changes are correct. But a day later when you take the force compilation off and turn the smarty cache back on the site changes that have been made go away and everything goes back to what it was before. The database is pulling files that do not even exist, I assume from stored cache. How long does it take prestashop to dump that stored cache and stop pulling deleted data?

 

I have done the clear smarty cache by clicking the button, I have done the manual cache flush by deleting files from the server, I have cleared my cookies and dns cache, I have cleared my brower cache dozens of times. Am I the only one that has ever had this problem? I have used Firefox and Internet Explorer. I keep seeing all of these suggestions and none of them seem to work.

 

Does it take the prestashop database a day or two to catch up to the changes and if so why?

Link to comment
Share on other sites

I have a VPS server, so I don't think that would be cloud hosting. So there is nobody on this forum that makes changes to their site such as add or delete categories, add or delete new products, add or delete images and then the cache pulls in old deleted data for days after? Nobody out here has ever had that problem? Only me?

  • Like 1
Link to comment
Share on other sites

I would open a support ticket anyway. VPS does not guarantee data are not stored in cloud. I actually had a few customers which were experiencing the same issue (didn't even know they are using cluster) and file balancer was the reason.

Link to comment
Share on other sites

I have not had any of the issues that you have stated. I have worked on several hundred shops in my time developing with Prestashop. My best guess is that it is an issue with your server permissions though. Under some forms of php and specific conditions an application can create files, but not have the ability to delete or modify them. That could very well be the case on your site. The clear cache button might not be working because the permissions on your server are not set to standard settings. 

 

Why don't you tell us more about your problem and we might be able to help more. Who is your host? Are they running a vps cloud? Is there an nginx frontend server? When you delete the cache files through Prestashop are they actually deleted?

 

Hosting complicates the issue. Every hosting company wants to do things differently, so it is hard to write software that works with every host with their odd settings. 

Link to comment
Share on other sites

Thank You for the very simple anwers and possible solutions to my issues. I will contact my host again and ask them these specific questions and get some answers from them. My host is InMotion by the way and I am on a VPS server.

 

The files and changes are being reflected. They are reflected immediately if I turn the smarty cache off and select the force compilation, but if I turn the smarty cache back on 10 minutes later and take off the force compilation the changes are not reflected. It takes right around 24 hours for the changes to stay saved when turning the smarty cache back on.

 

If that's the way the Prestashop software works that's fine. I can't believe I am the only one that has ever had this issue. If it's a server issue I will contact the top tech support person at Inmotion. I will post the comments that I get from InMotion. Stay Tuned. Thanks again.

  • Like 1
Link to comment
Share on other sites

  • 6 months later...
×
×
  • Create New...