Support Forum

Async Javascript files

SP Stefano Prete
Stefano Prete
Member

Hey boys, I have a question…

I have installed on my site a great plugin called “Asyncronous Javascript”, you can find it HERE.

In Google Page Speed, the site got a sensational 95%. But some functions in SP didn’t like that…

The two drop down menus at the top disappeared completely (“New/Recently updated topics” and “Select forum”), the button “Submit reply” and the possibility to load images in a post both stopped working. “Submit reply” was working only after refreshing the page.

But the funny thing is, I tested the site and the forum with Firefox, Chrome and Safari. Everything was working perfectly. I am in Australia, but some people in Italy had the problems I mentioned above, with all those browsers and with iPad. The site is hosted by an Italian company on some servers in the UK.

The plugin allows to ignore some JS files, in case of conflicts.

So the question is: which file/s control those functions? Is it possible to defer those scripts without errors?

Thank you! wink

45 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Can we confirm something here..? Are you saying that in Australia everything loads fine but in Italy – using a specific ISP – it does not? That seems to be what you are suggesting but it doesn’t really make a lot of sense…

SP Stefano Prete
Stefano Prete
Member

It doesn’t make sense AT ALL, Andy!

I set up the plugin, tested and everything was perfectly fine.

A few days later, people in Italy started telling me “This is not working, that is not working either”, so I switched the plugin off and now they say everything is fine. confused

YS Yellow Swordfish
Yellow Swordfish
Member

I will need to download the plugin and give it a try on a test site. Hopefully can fix that up for later today. So will get back to you.

YS Yellow Swordfish
Yellow Swordfish
Member

I have to say I am totally surprised but so far all my tests suggest it has no negative impact at all and seems to work pretty well.

However – I DID have to clear my browser cache before things worked correctly so could it be as simple as that?

SP Stefano Prete
Stefano Prete
Member

Thank you Andy!

I will try again and keep you updated wink

SP Stefano Prete
Stefano Prete
Member

Here I am!

I switched on the plugin again and so far so good. No complaints…yet.

Just one thing: the button to add a poll just disappeared…

YS Yellow Swordfish
Yellow Swordfish
Member

I don’t see that problem either. I think some of this is caused by caching and you might want to turn off the combined scripts option (global options), run a forum page, clear your browser cache and then run a forum page again and see what you get. I certainly needed to clear the browser cache regularly…

One thing I have noticed and that is that this plugin does a real nasty job on the tinyMCE toolbar buttons – not sure what is going in there but it IS this plugin.

SP Stefano Prete
Stefano Prete
Member

Andy, the only thing that is gone is the button for the polls, as I said before.

Everything else is working perfectly, TinyMCE included.

The site scores an excellent 94% in Google Page Speed so I am very happy.

No way to improve it further, I would need a CSS sprite but I cannot do it with the theme I am using.

Very good tho! laugh

MP Mr Papa
Mr Papa
Member

the ‘code’ to display a button is not different from one to another…  are you sure that users have permission to create or vote in polls where you are testing?  Its a forum by forum setting…

SP Stefano Prete
Stefano Prete
Member

I should have the permission, Steve.

I am the admin of the site and the forum. The button was always there and now it’s gone…

YS Yellow Swordfish
Yellow Swordfish
Member

Try this:

  1. Open forum admin > Options > Global Settings
  2. Make sure that the option to ‘Enable combining and caching of forum script (JS) files‘ is turned OFF
  3. Update panel
  4. Open forum admin > Integration > Page and Permalink
  5. Make sure that the option to ‘Load javascript in footer‘ is turned OFF
  6. Update panel
  7. Clear your browser cache to remove all cached JavaScripts

See if that works for you. Seems to be perfect my end much to my surprise.

SP Stefano Prete
Stefano Prete
Member

Andy, I have done it.

But that damn button is not there yet…frown

YS Yellow Swordfish
Yellow Swordfish
Member

Any errors getting reported in the script console when you, say, add a new topic to a forum on which polls are allowed and active?