Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
ajax system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
14 Jan 2015 at 14:57 UTC
Updated:
1 Jul 2015 at 18:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
andypostSo we are going to... depending on a kind of response to manage assets differently?
Comment #2
wim leersThe parent issue landed, we can work on this now.
Comment #3
wim leersEt voila.
Comment #4
wim leers#1: Basically: yes. Before #2368797: Optimize ajaxPageState to keep Drupal 8 sites fast on high-latency networks, prevent CSS/JS aggregation from taking down sites and use HTTP GET for AJAX requests, we implicitly relied on statics in
_drupal_add_(css|js)(). We've been working towards removing those for several years. Finally it has happened. For HTML responses, we render everything insidehtml.html.twig, and then use#attachedto determine which<script>and<link rel="stylesheet">tags to render. For AJAX responses, we don't have that; there can be multiple AJAX commands in an AJAX response, each needing assets, and potentially the same. Hence:;addAttachments().Comment #5
wim leersAddressing #2368797-65: Optimize ajaxPageState to keep Drupal 8 sites fast on high-latency networks, prevent CSS/JS aggregation from taking down sites and use HTTP GET for AJAX requests, point 3:
Comment #8
wim leersOops.
Comment #10
wim leers#2347469: Rendering forms in AjaxResponses does not attach assets automatically now also landed; now we can introduce this with ease, and improve what #2347469: Rendering forms in AjaxResponses does not attach assets automatically did. Will do this tomorrow.
Comment #11
wim leersAlready done in #2407195: Move attachment processing to services and per-type response subclasses.