-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh head before swup containers ? #1
Comments
Hi, it wouldn't be right to replace head content ahead of time, as some styles from the previous page could be removed before it's needed for example. I would recommend to include the styles for all the pages everywhere if you can, but I get why you want to avoid it. Maybe including styles for layout only in a separate file on all pages? This native prefetch sounds like it could be useful here, but I'm not sure about support or if it would help. |
Hello Sir, |
I believe this should be handled in v3 and the new version of plugin, but @daun should know more details on that. |
Yes, from swup 3 onwards, the head plugin supports waiting for stylesheets to load before transitioning to the new page. |
Thanks for the reply sir, |
Plus about the css load and swap with each transition, Things are fine but what concerns me is a small milliseconds flash of css load which seems to occur mostly after 4-5 clicks/transitions from one link to another. |
Plus, can you please share the code to add multiple plugins to swup as I am trying but guessing that I am doing mistakes. |
swup.test.mp4 |
1): You can clearly see the flash at 4-6 click which becomes sort of persistent afterwards. |
@CodersRage Please create a new discussion on the swup repo; that way other users can offer advice about your setup. If you think you've found an actual bug, feel free to create a separate issue with a reproducible teast case. |
ok sir |
but how can i post that reproducable file? |
@CodersRage you can use and fork this CodeSandbox template: swup-test-case-template |
Hi,
When I use the head plugin the CSS is broken a few moment after the transition, and it's fix when the CSS file is load.
it's posible to refrech the head before swup containers ?
Thanks, and sorry for my bad english.
The text was updated successfully, but these errors were encountered: