{"id":5154,"date":"2022-10-31T19:05:07","date_gmt":"2022-10-31T16:05:07","guid":{"rendered":"https:\/\/inoveo.ro\/uncategorized\/animatii-svg-la-incarcarea-site-ului-lyset\/"},"modified":"2024-07-24T16:30:27","modified_gmt":"2024-07-24T13:30:27","slug":"svg-animations-on-lyset-website","status":"publish","type":"post","link":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/","title":{"rendered":"SVG Animations on Lyset Website"},"content":{"rendered":"<p>When working on websites, I sometimes encounter problems that need to be resolved, issues I didn\u2019t foresee when planning. From bugs arising from compatibility between the theme used and plugins to bugs that seem nonsensical and need to be fixed with what I call &#8220;brute-force&#8221; methods, meaning writing code to modify an existing functionality that gives me an undesired result.<\/p>\n<p>Generally, animations are not a problem for me. I play with them until I find an animation I like and then continue working on something else. However, I sometimes find seemingly minor issues that consume a lot of my time.<\/p>\n<p>In the case of the Lyset website, after creating an SVG for the header that animated, I added it to the site, refreshed, and was very happy to see it working as I wanted. But when I refreshed again, I found it no longer worked; the animation wouldn\u2019t start at all. Why? I couldn\u2019t figure it out, but after more tests and research online, I discovered that there is a problem with SVG files containing CSS animations inside them. Although normally, on any site load, all the CSS code should be executed, the animations would only restart if the file was cleared from the cache. I still don\u2019t know why this happens, but being stubborn, I started looking for increasingly complex solutions.<\/p>\n<p>First, I tried removing the SVG files from the cache, making them expire immediately. But obviously, this didn\u2019t work. Then I checked if the animation would restart if I switched from displaying the SVG as an image to including it as a background through CSS. Since that didn\u2019t work either, I tried writing JavaScript code that loads the SVG file after the site starts loading. After more research online, I discovered that it might be possible for the animation to restart after a refresh if I add the date to the SVG file\u2019s link using JS. Unfortunately, I hit a wall with this animation.<\/p>\n<p>Nothing worked, and I had already lost a lot of time. I was already thinking of very complicated things for what should have been simple. Then I remembered another website where I had added SVG animations, but in that case, the code was included directly in the page by the theme (even though the code was uploaded by me through an SVG file), not through a link. Although I don\u2019t like to include code directly in the pages I create because I don\u2019t expect our clients to know how to modify it, I decided to try this approach. In the end, this simple and quick solution worked.<\/p>\n<p>Over time, I\u2019ve built up a long database of bugs and quirks like these that help me when working on websites. It can be demoralizing to work on a single problem for many hours (or even days), but solutions are generally found. Some solutions are simple and elegant, while others require creating something akin to Frankenstein\u2019s monster. But every time, in the end, I feel like I\u2019ve solved a tough puzzle or won a difficult chess match.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When working on websites, I sometimes encounter problems that need to be resolved, issues I didn&rsquo;t foresee when planning. From bugs arising from compatibility between the theme used and plugins to bugs that seem nonsensical [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/\">Read More&#8230;<span class=\"screen-reader-text\"> from SVG Animations on Lyset Website<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[57],"tags":[],"class_list":["post-5154","post","type-post","status-publish","format-standard","hentry","category-website-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SVG Animations on Lyset Website - INOVEO<\/title>\n<meta name=\"description\" content=\"When working on websites, I sometimes encounter problems that need to be resolved, issues I didn\u2019t foresee when planning\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SVG Animations on Lyset Website\" \/>\n<meta property=\"og:description\" content=\"When working on websites, I sometimes encounter problems that need to be resolved, issues I didn\u2019t foresee when planning\" \/>\n<meta property=\"og:url\" content=\"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/\" \/>\n<meta property=\"og:site_name\" content=\"INOVEO\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inoveobranding\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-31T16:05:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-24T13:30:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/inoveo.ro\/wp-content\/uploads\/2020\/08\/inoveo-logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"336\" \/>\n\t<meta property=\"og:image:height\" content=\"416\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Inoveo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@inoveobranding\" \/>\n<meta name=\"twitter:site\" content=\"@inoveobranding\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Inoveo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/\"},\"author\":{\"name\":\"Inoveo\",\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/#\\\/schema\\\/person\\\/b2385fd5dcd9d87cf609b6f457fc4a0b\"},\"headline\":\"SVG Animations on Lyset Website\",\"datePublished\":\"2022-10-31T16:05:07+00:00\",\"dateModified\":\"2024-07-24T13:30:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/\"},\"wordCount\":527,\"publisher\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/#organization\"},\"articleSection\":[\"WEBSITE DEVELOPMENT\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/\",\"url\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/\",\"name\":\"SVG Animations on Lyset Website - INOVEO\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/#website\"},\"datePublished\":\"2022-10-31T16:05:07+00:00\",\"dateModified\":\"2024-07-24T13:30:27+00:00\",\"description\":\"When working on websites, I sometimes encounter problems that need to be resolved, issues I didn\u2019t foresee when planning\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SVG Animations on Lyset Website\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/\",\"name\":\"INOVEO\",\"description\":\"Agentie de branding ce ofera servicii de branding, rebranding, package design, webdesign si strategii in mediul online.\",\"publisher\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Organization\",\"Place\",\"ProfessionalService\"],\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/#organization\",\"name\":\"INOVEO Concept\",\"alternateName\":\"INOVEO\",\"url\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/\",\"logo\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/#local-main-organization-logo\"},\"image\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/#local-main-organization-logo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inoveobranding\\\/\",\"https:\\\/\\\/x.com\\\/inoveobranding\",\"https:\\\/\\\/www.instagram.com\\\/inoveo.consultants\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inoveoconsultants\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@inoveo\"],\"address\":{\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/#local-main-place-address\"},\"telephone\":[\"+40740111771\"],\"openingHoursSpecification\":[{\"@type\":\"OpeningHoursSpecification\",\"dayOfWeek\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\"],\"opens\":\"09:00\",\"closes\":\"18:00\"},{\"@type\":\"OpeningHoursSpecification\",\"dayOfWeek\":[\"Saturday\",\"Sunday\"],\"opens\":\"00:00\",\"closes\":\"00:00\"}],\"email\":\"hello@inoveo.ro\",\"vatID\":\"RO34938044\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/#\\\/schema\\\/person\\\/b2385fd5dcd9d87cf609b6f457fc4a0b\",\"name\":\"Inoveo\"},{\"@type\":\"PostalAddress\",\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/#local-main-place-address\",\"streetAddress\":\"Str. Doctor Niculae D. Staicovici 51, Etaj 2, Ap 5\",\"addressLocality\":\"Bucuresti\",\"postalCode\":\"050559\",\"addressRegion\":\"Bucure\u0219ti\",\"addressCountry\":\"RO\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/inoveo.ro\\\/en\\\/website-development\\\/svg-animations-on-lyset-website\\\/#local-main-organization-logo\",\"url\":\"https:\\\/\\\/inoveo.ro\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/inoveo-logo.png\",\"contentUrl\":\"https:\\\/\\\/inoveo.ro\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/inoveo-logo.png\",\"width\":336,\"height\":416,\"caption\":\"INOVEO Concept\"}]}<\/script>\n<meta name=\"geo.placename\" content=\"Bucuresti\" \/>\n<meta name=\"geo.region\" content=\"Romania\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SVG Animations on Lyset Website - INOVEO","description":"When working on websites, I sometimes encounter problems that need to be resolved, issues I didn\u2019t foresee when planning","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/","og_locale":"en_US","og_type":"article","og_title":"SVG Animations on Lyset Website","og_description":"When working on websites, I sometimes encounter problems that need to be resolved, issues I didn\u2019t foresee when planning","og_url":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/","og_site_name":"INOVEO","article_publisher":"https:\/\/www.facebook.com\/inoveobranding\/","article_published_time":"2022-10-31T16:05:07+00:00","article_modified_time":"2024-07-24T13:30:27+00:00","og_image":[{"width":336,"height":416,"url":"https:\/\/inoveo.ro\/wp-content\/uploads\/2020\/08\/inoveo-logo.png","type":"image\/png"}],"author":"Inoveo","twitter_card":"summary_large_image","twitter_creator":"@inoveobranding","twitter_site":"@inoveobranding","twitter_misc":{"Written by":"Inoveo","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/#article","isPartOf":{"@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/"},"author":{"name":"Inoveo","@id":"https:\/\/inoveo.ro\/en\/#\/schema\/person\/b2385fd5dcd9d87cf609b6f457fc4a0b"},"headline":"SVG Animations on Lyset Website","datePublished":"2022-10-31T16:05:07+00:00","dateModified":"2024-07-24T13:30:27+00:00","mainEntityOfPage":{"@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/"},"wordCount":527,"publisher":{"@id":"https:\/\/inoveo.ro\/en\/#organization"},"articleSection":["WEBSITE DEVELOPMENT"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/inoveo.ro\/#organization"}},{"@type":"WebPage","@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/","url":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/","name":"SVG Animations on Lyset Website - INOVEO","isPartOf":{"@id":"https:\/\/inoveo.ro\/en\/#website"},"datePublished":"2022-10-31T16:05:07+00:00","dateModified":"2024-07-24T13:30:27+00:00","description":"When working on websites, I sometimes encounter problems that need to be resolved, issues I didn\u2019t foresee when planning","breadcrumb":{"@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/inoveo.ro\/en\/home\/"},{"@type":"ListItem","position":2,"name":"SVG Animations on Lyset Website"}]},{"@type":"WebSite","@id":"https:\/\/inoveo.ro\/en\/#website","url":"https:\/\/inoveo.ro\/en\/","name":"INOVEO","description":"Agentie de branding ce ofera servicii de branding, rebranding, package design, webdesign si strategii in mediul online.","publisher":{"@id":"https:\/\/inoveo.ro\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/inoveo.ro\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Organization","Place","ProfessionalService"],"@id":"https:\/\/inoveo.ro\/en\/#organization","name":"INOVEO Concept","alternateName":"INOVEO","url":"https:\/\/inoveo.ro\/en\/","logo":{"@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/#local-main-organization-logo"},"image":{"@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/#local-main-organization-logo"},"sameAs":["https:\/\/www.facebook.com\/inoveobranding\/","https:\/\/x.com\/inoveobranding","https:\/\/www.instagram.com\/inoveo.consultants\/","https:\/\/www.linkedin.com\/company\/inoveoconsultants\/","https:\/\/www.youtube.com\/@inoveo"],"address":{"@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/#local-main-place-address"},"telephone":["+40740111771"],"openingHoursSpecification":[{"@type":"OpeningHoursSpecification","dayOfWeek":["Monday","Tuesday","Wednesday","Thursday","Friday"],"opens":"09:00","closes":"18:00"},{"@type":"OpeningHoursSpecification","dayOfWeek":["Saturday","Sunday"],"opens":"00:00","closes":"00:00"}],"email":"hello@inoveo.ro","vatID":"RO34938044"},{"@type":"Person","@id":"https:\/\/inoveo.ro\/en\/#\/schema\/person\/b2385fd5dcd9d87cf609b6f457fc4a0b","name":"Inoveo"},{"@type":"PostalAddress","@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/#local-main-place-address","streetAddress":"Str. Doctor Niculae D. Staicovici 51, Etaj 2, Ap 5","addressLocality":"Bucuresti","postalCode":"050559","addressRegion":"Bucure\u0219ti","addressCountry":"RO"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/#local-main-organization-logo","url":"https:\/\/inoveo.ro\/wp-content\/uploads\/2020\/08\/inoveo-logo.png","contentUrl":"https:\/\/inoveo.ro\/wp-content\/uploads\/2020\/08\/inoveo-logo.png","width":336,"height":416,"caption":"INOVEO Concept"}]},"geo.placename":"Bucuresti","geo.region":"Romania"},"featured_image_src":"","featured_image_src_square":false,"author_info":{"display_name":"Inoveo","author_link":"https:\/\/inoveo.ro\/en\/author\/marius\/"},"rbea_author_info":{"display_name":"Inoveo","author_link":"https:\/\/inoveo.ro\/en\/author\/marius\/"},"rbea_excerpt_info":"When working on websites, I sometimes encounter problems that need to be resolved, issues I didn&rsquo;t foresee when planning. From bugs arising from compatibility between the theme used and plugins to bugs that seem nonsensical [...]<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/\">Read More...<span class=\"screen-reader-text\"> from SVG Animations on Lyset Website<\/span><\/a><\/p> [...]<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/inoveo.ro\/en\/website-development\/svg-animations-on-lyset-website\/\">Read More...<span class=\"screen-reader-text\"> from SVG Animations on Lyset Website<\/span><\/a><\/p>","category_list":"<a href=\"https:\/\/inoveo.ro\/en\/category\/website-development\/\" rel=\"category tag\">WEBSITE DEVELOPMENT<\/a>","comments_num":"0 comments","_links":{"self":[{"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/posts\/5154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/comments?post=5154"}],"version-history":[{"count":4,"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/posts\/5154\/revisions"}],"predecessor-version":[{"id":7507,"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/posts\/5154\/revisions\/7507"}],"wp:attachment":[{"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/media?parent=5154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/categories?post=5154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inoveo.ro\/en\/wp-json\/wp\/v2\/tags?post=5154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}