0

I am using an FTP client to download/edit/upload CSS files of my child theme. Typically that worked smoothly and updates were seen after refreshing the page in the browser immediately.

However, on my current fresh wordpress install, I see changes in my CSS only after a few minutes, which makes the whole process really annoying. I don't quite know what I am doing wrong.

Here some details:

  • I use a child-theme which uses the twentythirteen theme as a parent.

  • It's definitley not a browser cache issue, since I work on chrome incognito mode with the dev-console opened (and enabled Disable cache (while DevTools is open) checkbox)

  • One strange thing I observer is, that, when accessing the child theme's CSS file directly in the browser it appears differently sometimes. I suspect, Wordpress is somehow accessing the CSS file and if there was a change, it caches the file and from then on returnes a minified version of the CSS. Maybe this is the root cause of the error. This is what the file actually looks like: https://i.sstatic.net/kJDcv.png This is what the same file most of the times looks like when accessed via the browser directly: https://i.sstatic.net/oW2TG.png

  • This is the excerpt of the child-theme's functions.php which shows how the child-theme's style is included. Maybe I am doing something wrong here: http://pastebin.com/0MRjTTjf

Hope you can help me.

6
  • Have you tried doing CTRL+F5 when you refresh?
    – Aravona
    Commented Nov 12, 2015 at 10:27
  • yes. as i said: it's definitely not a browser cache issue.
    – beta
    Commented Nov 12, 2015 at 10:29
  • 2
    Sounds like varnish (or a similar proxy cache) - this is at the hosting level, not a problem you can solve with code Commented Nov 12, 2015 at 10:39
  • but the different display of the style.css file as shown in above screenshots (i.imgur.com/TAUYjGR.png and i.imgur.com/QnycJ2r.png) leads me to belife that Wordpress is doing something here and not some hosting-cache? Or can someone explain to me why the file is displayed differently?
    – beta
    Commented Nov 12, 2015 at 10:47
  • Do you have any cache plugin installed?
    – Sisir
    Commented Nov 25, 2015 at 6:32

1 Answer 1

0

My Webhoster has enabled mod_pagespeed by default. I had to turn this off via entering ModPagespeed off in my .htaccess file. Abhik also pointed to this in his comment.

1
  • Can you post your htaccess file? I have this issue also.
    – Fenix
    Commented Feb 9, 2017 at 8:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.