View Full Version : Big Issue with javascript and admin panel refreshing
RichieBoy67
01-28-2016, 01:34 AM
Ok, yesterday I switched to cloudflare. Today all of a sudden my admincp panel keeps refreshing and my javascript ticker is showing a letter A after every thread. Help please.
Max Taxable
01-28-2016, 01:37 AM
You don't need cloudflare. It doesn't help performance and it actually slows down first byte time. I used it for two years before I learned how to actually optimize a site.
My advice is dump it.
See if you have the Rocket Loader enabled, it's known to cause these types of issues.
RichieBoy67
01-28-2016, 01:38 AM
Yep
Max Taxable
01-28-2016, 01:38 AM
See if you have the Rocket Loader enabled, it's known to cause these types of issues.
RichieBoy67
01-28-2016, 01:43 AM
Actually my first time load hasn't changed much at all and my reload time has improved but I am not really using it for faster load. I am using it because I need external name servers. I will just be using it until I figure out how to get better ones.
I believe it was RocketLoader on Cloudflare that was causing the issue but I disabled all the extras until I figure out exactly what was causing the issue.
Max Taxable
01-28-2016, 01:45 AM
Well, it's documented that CF interferes with the "handshake" thereby causing longer first byte time, CF even admitted it finally.
But yeah, RocketLoader definitely messes up stuff.
shimei
01-28-2016, 02:42 AM
Ok, yesterday I switched to cloudflare. Today all of a sudden my admincp panel keeps refreshing and my javascript ticker is showing a letter A after every thread. Help please.
https://vborg.vbsupport.ru/external/2016/01/1.jpg
For your admincp...
I had the same issue. You have to create a page rule in Cloudflare. Create a rule for your admincp, mine is as following: http://yourdomain/admincp/index.php*
The above rule was for my Vb5 site, I don't know whether your admincp is using a different url. Just basically disable all caching and performance related options for admincp in your page rule.
Regarding issues with other parts of the site... there's a performance option in cloudflare that is beta... it is under the speed category and is called "Rocket Loader". It caused all kinds of issues so I turned it off.
RichieBoy67
01-28-2016, 03:03 AM
Well, it's documented that CF interferes with the "handshake" thereby causing longer first byte time, CF even admitted it finally.
But yeah, RocketLoader definitely messes up stuff.
My site wasn't loading so fast in the first place.
shimei
01-28-2016, 03:04 AM
<a href="https://blog.cloudflare.com/ttfb-time-to-first-byte-considered-meaningles/" target="_blank">Stop worrying about first byte time.</a>
Max Taxable
01-28-2016, 04:07 AM
Stop worrying about first byte time. (https://blog.cloudflare.com/ttfb-time-to-first-byte-considered-meaningles/)Yeah, that old article is crap. They later ADMITTED CF screws with the handshake. Plus, they don't understand what is happening in request #1 - this is where the server queries the code, scripts and database to create the executable page source code file, and uploads this to the browser to execute. It's no mystery anymore why this file is so much larger and takes a lot longer to compile when you have a CDN. Request #1 IS the FBT. It's not even a debate anymore and ceased to be one some time back.
shimei
01-28-2016, 04:21 AM
Yeah, that old article is crap. They later ADMITTED CF screws with the handshake. Plus, they don't understand what is happening in request #1 - this is where the server queries the code, scripts and database to create the executable page source code file, and uploads this to the browser to execute. It's no mystery anymore why this file is so much larger and takes a lot longer to compile when you have a CDN. Request #1 IS the FBT. It's not even a debate anymore and ceased to be one some time back.
Are the issues you're stating still accurate? I don't how accurate WebPageTest is but I just ran my site through WebPageTest and came out with a first byte time of .401s and second repeat view of .269s. The site scored an A for first byte time.
This is through Cloudflare: http://www.webpagetest.org/result/160128_YG_9SK/
Max Taxable
01-28-2016, 04:59 AM
Are the issues you're stating still accurate?Yes they are and in fact, I was able to successfully lobby Patrick Meenan to adjust WPT so it doesn't assign really low target first byte times to sites that have CDNs. That is why now we get a artificial score on FBT for sites using CDNs. WPT changed the way it handles CDNs, that does NOT change the issue CDNs create with FBT.
Here's what you really look like, use IE 11 only as the test browser, for worst case. Firefox and Chrome skip certian types of calls to make themselves appear "faster" to the end user.
http://www.webpagetest.org/result/160128_F8_AW6/
It's not open to debate, CF acknowledged it. It's simply a fact. But like any other religious belief, no amount of facts can persuade a CF evangelist.
shimei
01-28-2016, 05:07 AM
Yes they are and in fact, I was able to successfully lobby Patrick Meenan to adjust WPT so it doesn't assign really low target first byte times to sites that have CDNs. That is why now we get a artificial score on FBT for sites using CDNs. WPT changed the way it handles CDNs, that does NOT change the issue CDNs create with FBT.
Here's what you really look like, use IE 11 only as the test browser, for worst case. Firefox and Chrome skip certian types of calls to make themselves appear "faster" to the end user.
http://www.webpagetest.org/result/160128_F8_AW6/
Thanks Max.
Max Taxable
01-28-2016, 05:10 AM
Thanks Max.When I got CF to admit the issue, and got Meenan to CHANGE WPT, pretty much case closed. Wouldn't you say? I got tired of wasting mine and other people's time over FBT on sites that use CDNs and in the process, ended the debate. I don't how accurate WebPageTest isIt is the ONLY test site out there that uses real browsers, real connections and is REAL WORLD scientific testing.
Max Taxable
01-28-2016, 05:21 AM
More edification. Long read but very educational:
https://thethemefoundry.com/blog/why-we-dont-use-a-cdn-spdy-ssl/ On the second line, SSL negotiation time is bothersome. This line represents the download of our site’s CSS file from MaxCDN’s servers. This request involves a DNS lookup (76ms; blue-green), a TCP connection (110ms; orange), an SSL negotiation (429ms; purple) and the content download (243ms; bright green). Notice that the SSL negotiation was roughly 4 times the length of the initial TCP connection. Clearly, the SSL negotiation is not well tuned. We spent a lot of time tuning our SSL connection for speed and now we are suffering from slow SSL negotiation on the CDN. This was not the result I was hoping for when we implemented the CDN.
Another thing to note about the CDN performance (items 2-13, 15-16) is that this negotiation is repeated 3 times. Additionally, we incur extra DNS lookups, which slows our asset loads. Fortunately, the last time, I believe that the SSL negotiation uses SSL resumption and it is much quicker. Finally, notice the diagonal waterfall of the elements. We are seeing the same serial download pattern that we saw in our pre-launch site tests.
RichieBoy67
01-28-2016, 07:03 AM
For your admincp...
I had the same issue. You have to create a page rule in Cloudflare. Create a rule for your admincp, mine is as following: http://yourdomain/admincp/index.php*
The above rule was for my Vb5 site, I don't know whether your admincp is using a different url. Just basically disable all caching and performance related options for admincp in your page rule.
Regarding issues with other parts of the site... there's a performance option in cloudflare that is beta... it is under the speed category and is called "Rocket Loader". It caused all kinds of issues so I turned it off.
Thanks, I will try that though the issues has gone away since I turned off Rocketbooster..I think that thing has been in beta a long time.
I just wasn't sure which setting was causing the issue at first so I disabled everything and turned them on one at a time. All seems ok now.
--------------- Added 1453972257 at 1453972257 ---------------
More edification. Long read but very educational:
https://thethemefoundry.com/blog/why-we-dont-use-a-cdn-spdy-ssl/
Well the site in question usually takes around 5 seconds for first page load depending on what page is visited. It is heavily customized and very media heavy. I would like to get the speed down but I have done pretty much what can be done without re-themeing.
As for Cloudflare, I really switched to it because I needed a free external dns and they seemed pretty solid. Like I said, I have not noticed a difference in first time page load but once cached i have noticed a much faster load time so far.
Some of the options are pretty decent as well like the smart error page. if someone gets a 404 they will get an error page with a search of your pages related to what they were visiting. That is pretty awesome.
Thanks for the research. I will definitely check it out. I am always happy to learn more. :)
final kaoss
01-28-2016, 10:36 AM
Richie, one thing you can do is increase the caching of static content beyond 5 hours for repeat visitors.
You have a 404 to fix as well http://www.webpagetest.org/result/160128_CM_P3H/1/details/
RichieBoy67
01-28-2016, 10:41 AM
Richie, one thing you can do is increase the caching of static content beyond 5 hours for repeat visitors.
You have a 404 to fix as well http://www.webpagetest.org/result/160128_CM_P3H/1/details/
Thanks!
Funny you mentioned that as I had increased that already from 4 to 5 upon set up. :)
I am checking that link right now! I am sure we have a few of those kicking around..
--------------- Added 1453985467 at 1453985467 ---------------
I removed the ssl image thing as the javascript was slowing the entire site load.
I am looking at the tag cloud. I think it is the style cache. I wll just turn it off for awhile I think. I recently cleared all the tags and there are only a few now..The rest must be stuck in the style cache.
final kaoss
01-28-2016, 04:56 PM
You could probably get away with caching js/css for a month or two and the images for 1-2 weeks.
RichieBoy67
01-29-2016, 08:09 AM
You could probably get away with caching js/css for a month or two and the images for 1-2 weeks.
Actually I was just about to make a new thread about this very topic but seeing as it is related we may as well discuss it here if ok with the mods.
In regards to caching I am still trying to figure out how to do this properly with Cloudflare. With the free account caching options are very limited.
Are you referring to htaccess because those settings are bypassed now by cloudflare. I can set a longer time but the only other options are:
No Query String
Ignore Query String
Standard
I currently have standard set.
I know there are ways to link my images directly from the cdn or use my own ip address which would then use my htaccess but that would remove the security.
#Question.. I have a mail server set up through my domain and ip and the record is in cloudflare. Do I need this record there? It is a security vulnerability as it allows people to see my ip directly.
Thanks!!
--------------- Added 1454066040 at 1454066040 ---------------
Going to create a new post. Having more problems.
shimei
01-29-2016, 06:50 PM
Just for FYI, I dropped a second on avg and sometimes two seconds after using Pro version. I went back to the free version after trying to cut monthly expenses. I am using Rocket Loader at the moment and having no issues with VB5. Again that page rule was important to create for the admincp. It blinked uncontrollably.
Interested in your last post as I am currently using Standard and not no query string or ignore.
Just saying if it is an option for you to experiment with the Pro version it is worthwhile. Total things I did last night to reduce page load from 9 seconds + to 3-4 seconds:
Enabled "Rocket Loader" in Cloudflare (Improves load time for pages that include JavaScript)
Disabled Gzip Compression in Vbulletin
Enabled Compression in Apache
Changed .htaccess
Minified JS File (header-rollup)
Removed Cookie Consent Script (was loading before the fold)
Removed YouTube Video from Front Page
Compressed various images to reduce size
RichieBoy67
01-30-2016, 12:19 AM
Just for FYI, I dropped a second on avg and sometimes two seconds after using Pro version. I went back to the free version after trying to cut monthly expenses. I am using Rocket Loader at the moment and having no issues with VB5. Again that page rule was important to create for the admincp. It blinked uncontrollably.
Interested in your last post as I am currently using Standard and not no query string or ignore.
Just saying if it is an option for you to experiment with the Pro version it is worthwhile. Total things I did last night to reduce page load from 9 seconds + to 3-4 seconds:
Enabled "Rocket Loader" in Cloudflare (Improves load time for pages that include JavaScript)
Disabled Gzip Compression in Vbulletin
Enabled Compression in Apache
Changed .htaccess
Minified JS File (header-rollup)
Removed Cookie Consent Script (was loading before the fold)
Removed YouTube Video from Front Page
Compressed various images to reduce size
Thanks, would you mind elaborating on the following?
Enabled Compression in Apache
Changed .htaccess
Minified JS File (header-rollup)
shimei
01-30-2016, 12:51 AM
Thanks, would you mind elaborating on the following?
Enabled Compression in Apache
Changed .htaccess
Minified JS File (header-rollup)
Hi Richie
Sure, here is my .htaccess. Mind you I use Vbulletin 5. I tried Ozzys mods on ozzmods which I see you on, but they didn't work on my server with my site, but I did pick up a few tips.
I incorporated the following: Vbulletin .htaccess (https://www.christforums.org/forum/entertainment-fun/computers-technology/10215-vbulletin-5-htaccess-file-performance)
Since gzip is enabled and handled by Apache there was no need for Vbulletin 5 to do it also.... a tip I picked up from Ozzy.
I used an online Js minifier and compressed the js file: http://jscompress.com/
It was recommended by various website test pages to do. Ya might like to check this site out: https://varvy.com/pagespeed/
By the way I am using Gtmetrix for the speed test. Comparisons are before and after which dropped 6-7 seconds on avg.
PHP 7 with OPCache also makes a difference. :)
RichieBoy67
01-30-2016, 02:32 AM
Hi Richie
Sure, here is my .htaccess. Mind you I use Vbulletin 5. I tried Ozzys mods on ozzmods which I see you on, but they didn't work on my server with my site, but I did pick up a few tips.
I incorporated the following: Vbulletin .htaccess (https://www.christforums.org/forum/entertainment-fun/computers-technology/10215-vbulletin-5-htaccess-file-performance)
Since gzip is enabled and handled by Apache there was no need for Vbulletin 5 to do it also.... a tip I picked up from Ozzy.
I used an online Js minifier and compressed the js file: http://jscompress.com/
It was recommended by various website test pages to do. Ya might like to check this site out: https://varvy.com/pagespeed/
By the way I am using Gtmetrix for the speed test. Comparisons are before and after which dropped 6-7 seconds on avg.
Ah yeah, Ozzie's htaccess works well but not with cloudflare. I will need to change it.
Yep, already use Gzip. It is ok to have it running either on Vbulletin or your server but not both.
I will check the javascript. I was trying to set up javacsript using the defer attribute but I never had time to finish. Hopefully your way is easier. :)
I also use GTmetrix, Googles page speed and the webpagespeed test page. using all of them is a good way to narrow things down. I love GTmetrix though especially for images!
I will give rocketbooster another try. I just have to add a rule to have it ignore my javascript newsticker because it ads a letter "A" to every thread shown. It did speed up everything though.
Thanks!
Any chance you could help me out with your dns settings? Have you checked your dns on mxttolbox? How can we set up reverse dns when using an external ip?
--------------- Added 29 Jan 2016 at 23:33 ---------------
PHP 7 with OPCache also makes a difference. :)
Hehe, I am fairly certain that there are many, many things on my site not ready for that yet.. I will try it at some point though. :)
--------------- Added 30 Jan 2016 at 00:03 ---------------
Hi Richie
Sure, here is my .htaccess. Mind you I use Vbulletin 5. I tried Ozzys mods on ozzmods which I see you on, but they didn't work on my server with my site, but I did pick up a few tips.
I incorporated the following: Vbulletin .htaccess (https://www.christforums.org/forum/entertainment-fun/computers-technology/10215-vbulletin-5-htaccess-file-performance)
Since gzip is enabled and handled by Apache there was no need for Vbulletin 5 to do it also.... a tip I picked up from Ozzy.
I used an online Js minifier and compressed the js file: http://jscompress.com/
It was recommended by various website test pages to do. Ya might like to check this site out: https://varvy.com/pagespeed/
By the way I am using Gtmetrix for the speed test. Comparisons are before and after which dropped 6-7 seconds on avg.
I forgot to mention.. In regards to caching..gtmetrix only sees the cdn caching which I now have set at 12 hours. it is not seeing my htaccess caching.
--------------- Added 30 Jan 2016 at 00:21 ---------------
My newsticker runs off rss so I suppose I just add http://#########.com/external.php as rule? Nope, that didn't work. How do I make Rocketbooster ignore certain javascript?
I only get 3 rules.. bummer. Not ready to spend $20 a month extra though on a pro account. :)
##Figured that out. Just add the following to the script tag you want ignored.
<script data-cfasync="false" src="/javascript.js"></script>
shimei
01-30-2016, 06:51 AM
##Figured that out. Just add the following to the script tag you want ignored.
<script data-cfasync="false" src="/javascript.js"></script>
If you have the time could you go over the process that you did to first find the culprit, which file, and where you inserted that code? While I haven't any issue, I don't know how to do what you did, and I would like to know... not meaning to inconvenience you.
RichieBoy67
02-01-2016, 05:43 AM
Just take data-cfasync="false" and paste after <script so you end up with this for example:
<script data-cfasync="false" type="text/javascript" src="clientscript/vbulletin_read_marker.js?v={vb:raw vboptions.simpleversion}"></script>
I actually think the issue is minifying the javascript at the same time you use Rocket loader that is causing the cpanel to refresh..
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.