The problem is, we cant use bundle scripts with it. Second, we have to guarantee that jquery will be loaded first, always, or we will get script error.
There is some examples to defer multiple scripts, maybe we need to improve the downloadjs code a little bit more:
I ran into really weird issues, that $ was not a function INSIDE a $(document).ready(). And, the major issue with nopCommerce is the inline scripts. E.g. AjaxCart is inline, which requires some libraries. So, I ended up not deferring jquery, ajaxcart, etc. In the end 8/10 scripts were not deferred, so not useful.
So it's much more work. First, all inline scripts should be put in a separate JS file, and then deferring can be implemented.
I'd still appreciate a reply from a.m. who said it's just not possible.
Well, not possible is living forever.. all other things are! Hahahahaa
I have got some jquery $ errors too, but Im still trying some other approaches. Once Google started to consider (since April 21st) mobile friendly sites in SERP and the blocking scripts are one of most degrading page score, we need to fix it as soon as possible.
Well, not possible is living forever.. all other things are! Hahahahaa
I have got some jquery $ errors too, but Im still trying some other approaches. Once Google started to consider (since April 21st) mobile friendly sites in SERP and the blocking scripts are one of most degrading page score, we need to fix it as soon as possible.
I know we will find a way.. lets back to work!!
Any news I let you know.
Yeah, it is a major issue. First of all, ALL inline javascript that relies on 3rd party libraries (e.g. jquery) must be moved to a js file. Agreed?
This will be a major improvement to nopCommerce. When we succeed, it should be in the next nopCommerce version.
I'm very busy at the moment, hope I find some time next week. Let's update in this thread when we have news!