Open vincehartman38 opened 10 years ago
Is it also possible to condense the javascript files into one file?
Yeah, this should be done differently. The JS could just as easily (more easily, really) be output directly onto the page on the initial load, rather than having to load it separately like this. Although there may be a reason for it that I am not thinking of.
Also, it would really be better to use the jQuery from WordPress rather than packaging your own version (which would make those JS snippets entirely unnecessary). I realize that many plugins are doing it wrong when it comes to jQuery, and this is likely being done to avoid conflicts. Just my 2¢. ;-)
@vincehartman38 Condensing the JS files into one might actually be a bad idea, if all of the JS isn't always needed. It would be better to keep the separate and leave the concatenating to caching plugins (assuming that only the required JS will be loaded).
I've been speed testing a website and this plugin recalls the server url when it does
site_url('?spui-script=before')
in a few places in the code passing a GET parameter. What is the intention of this within the script to recall the server on page load to pass a GET parameter? Is there a quicker way then to pass this than through a GET parameter?