3 ms·
Does it still break horribly and double-request everything if you have things like <link rel="canonical"> in your website?
by cheald 13y ago
Does it still break horribly and double-request everything if you have things like <link rel="canonical"> in your website?
- chc 13y agoI don't know when it was doing that, but the current version of Turbolinks only seems to affect the Asset Pipeline. It doesn't do anything to random link tags on your page. I specifically checked a page with rel="canonical" and Turbolinks only made one request.
- cheald 13y agoLast I looked at it, Turbolinks parsed the <head> section of the incoming request to see if any assets (which was basically...count the script/link nodes) changed. If they did, it went ahead and redirected to the requested URL, since it couldn't be sure that assets hadn't changed. This meant that anything page-specific in your <head> caused Turbolinks to double the work your app had do to, and provided no positive benefit at all. I'll check and see how it's behaving now. Edit: Looks like concerned assets are now tagged with a data attribute. Glad that's in there now.