Hi there,
I’m using Autoptimize to try and improve the speed performance of my site. But when I choose to ‘Optimise Javascript Code’, the Full Screen Header (on the menu as per the Fashion demo here) and background images (on other pages like this) no longer appear except when logged in as an administrator.
They do appear when I uncheck the ‘Optimise Javascript Code’. But this has a negative impact on page performance.
I assume it has something to do with the td-backstretch and tdHomepageFullItem elements, but my knowledge of JS isn’t great so I wouldn’t know where to start. Is there a solution whereby I can optimise my Javascript code with Autoptimize, but without preventing the full screen header and background images appearing?
Thanks.
Hi boroguide, the theme need to use the JavaScript to set those background images, when you choose to ‘Optimize JavaScript Code’, most probably the code is no longer use in the right moment and the images are no longer set, therefore, if you want to keep that background image you must avoid that option from that plugin. Try with other settings from the plugin.
Thank you for your understating!
Thank you for replying Calin.
Just for clarity, I see that it is possible to exclude individual scripts from Autoptimize when the ‘Optimize JavaScript Code’ is ticked. Is it possible, therefore, to place the JS that controls these elements into .js files and then exclude them so that Autoptimize can optimise the remainder of the script, while still allowing these images to show.
Or does this code work in conjunction with others i.e. if the tdHomepageFullItem js code was excluded but others weren’t, this would still cause issues?