Pagespeed interferes
-
Doesn’t show any scripts etc for the pages I tried. Maybe because I use mod_pagespeed server side?
Thanks!
-
Does it actually show that no scripts are there to be unloaded or it can’t retrieve the list of them and keeps showing that is loads? Have you tried on another website or home page? Perhaps you don’t really have assets loaded in those pages, though it’s not likely.
It says there are no scripts at all. I don’t have another site to test on although I did try a couple pages including the home page (latest posts). There is definitely scripts loaded. I am thinking that mod_pagespeed works before your plugin can work and so it doesn’t detect them because of the way mod_pagespeed loads them. I think to really test your plugin I probably need to disable mod_pagespeed. I have favorited this pluging for another time when serverside optimization is unavailable to me.
Thank you for your quick response!
If you’re sure there are styles/scripts loaded the right – WordPress – way (very important), then mod_pagespeed can affect the functionality and I will need to do some tests about it. I have a suspicion that the page the plugin accesses (which is made through AJAX with POST method) is cached and the plugin’s PHP code is not triggered.
I’ve tested it with W3 Total Cache and it works fine. I guess mod_pagespeed is more into caching in this instance.
I have an idea that could work: append a random string to the fetched URL such as sitedomain.com/post.html?[unique string here] = However, this could interfere with other plugins that might load differently if the URL is not exactly the same, but it’s very unlikely. In a future version of the plugin, I can add a settings page where the user can actually choose the way of fetching the assets based on his particular website settings (e.g. plugins he uses, the theme, apache configuration etc.).
Ok just for curiosity I disabled mod_pagespeed and tried your plugin.
What can I say except, great plugin!!! Works perfectly!!
I activated mod_pagespeed after I removed all the scripts and styles from the pages I wanted.
Now mod_pagespeed only processes the remaining scrips.
Thank you!!
Yes, this confirms my suspicion. The call that is made in the background to fetch the assets (while you are in the Dashboard and wait) gets the cached version. With other cache plugins it works because you are logged in while you’re doing it and they don’t usually cache pages for the logged in users (unless you specifically want to).
However, I need to update the plugin to work with mod_pagespeed and other possible cache plugins too. It’s quite a challenge to find a universal solution. Sometimes, it’s like having 3 caching plugins enabled and you expect them to work independently. Not likely 🙂
Thank you for the feedback and definitely an update for mod_pagespeed will be there!
The topic ‘Pagespeed interferes’ is closed to new replies.