Problem/Motivation
Checking page weight for the front page of Byte, I noticed that the views.ajax library is loaded on the anonymous front page.
This is because the 'blog' view enables 'use_ajax' globally, instead of only for the blog listing itself. The two blocks don't appear to have any kind of exposed filters or pager, so they don't need AJAX.
I tried to update the view but ran into a validation error on save (something about the tags filter not having any valid values) and then after removing that filter to get past it and exporting the config, what looked like several other unrelated changes.
If it wasn't for webform (the next issue I'm about to open), it looks like this change would also save loading jQuery in general, which would mean well over 100kb of JavaScript saved. But just configuring the views slightly differently will save loading the entire AJAX library by the looks of things which will still be tens of kb.
Steps to reproduce
Proposed resolution
User interface changes
Configuration changes
Issue fork drupal_cms-3553276
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
pameeela commentedThis is in the Byte config. I forgot to create an issue for that broken blog config problem, it's extremely wonky and we need to sort it out, basically an early days workaround that we need to fix properly.
Comment #3
pameeela commentedWhoops, sorry -- the underlying blog config that needs to be updated to disable Ajax is still in the original blog recipe! I created #3554686: Fix broken blog view config to fix the broken config.
Comment #5
pameeela commentedComment #7
phenaproximaMerged into 2.x and cherry-picked to 2.0.x and 1.2.x. I don't see much reason to not backport this performance improvement.