solved javascript changes in latest foxycart/marketplace update

soaringeagle
@soaringeagle
10 years ago
3,304 posts
i use cloudflare, and rocketloader, wich defers script execution
it worked perfectly cutting load times from a couple seconds to 1/2 a second..making my site in the top 5-10% of fastest sites tested on pingdom tools
up untill last night
after the foxy update..all javascripts failed

so i need to know what scripts were changed, where they are, so i can add a code snippit to not include them in the rocketload



--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

updated by @soaringeagle: 08/22/15 05:53:49AM
soaringeagle
@soaringeagle
10 years ago
3,304 posts
damn im good
found this in the index.php in the foxycart bundle

, array('async="async"', 'defer="defer')

it was
// Register our custom JS
    jrCore_register_module_feature('jrCore', 'javascript', 'jrFoxyCart', 'jrFoxyCart.js', array('async="async"', 'defer="defer'));

i removed that array so its just
// Register our custom JS
    jrCore_register_module_feature('jrCore', 'javascript', 'jrFoxyCart', 'jrFoxyCart.js');

and it works

i think it was the redundant defer
and since i wasnt sure how to add rocketloader="false" before src i just removed the array

do you see any issues with what i did asi barely can bumble my way through php


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
10 years ago
10,149 posts
If that works that's fine - those are just browser "hints" to tell it how to load the JS library.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
yea wich is what rocketloader does for almost all scripts so i get a 1 sec load time 1st view 1/2 a sec return views but the chat, ads, and share widget loads like a sec after page load
having it be redundant prevented all scripts from loading,
if i could add a rocketload off switchto the js file call that would have worked too but i am not sure how thats done in phgp, so just removing those worked


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities
brian
@brian
10 years ago
10,149 posts
soaringeagle:
yea wich is what rocketloader does for almost all scripts so i get a 1 sec load time 1st view 1/2 a sec return views but the chat, ads, and share widget loads like a sec after page load
having it be redundant prevented all scripts from loading,
if i could add a rocketload off switchto the js file call that would have worked too but i am not sure how thats done in phgp, so just removing those worked

You've added a layer of changes on top of Jamroom for caching and stuff, so you may see issues from time to time - that's not something we support or can fix for you if it has issues.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
soaringeagle
@soaringeagle
10 years ago
3,304 posts
yes i know that
and wasnt asking youto support it just help me find the script change that might have caused it...
i managed to find it myself though without too much trouble once i dug a lil

the issues ive seen is fast loads, low cpu usage...and the ocassional strange 522 504 503 523 0r 524 errorsthat seem to come from the server but no server error in the logs, it could be my connection too, or who knows...it appears to be between cloudflare and my server, at odd times of the night and very intermittent impossible to duplicate

thatr isa lil annoyance, but for that super fast load times its worth it i think since only see the issue in my sitemap crawler

but your right i have tweaked performance over and over till its super fast


--
soaringeagle
head dreadhead at dreadlocks site
glider pilot student and member/volunteer coordinator with freedoms wings international soaring for people with disabilities

Tags