{"id":188,"date":"2007-01-19T09:54:27","date_gmt":"2007-01-19T15:54:27","guid":{"rendered":"http:\/\/blog.codedread.com\/archives\/2007\/01\/19\/guide-to-deploying-svg-with-html\/"},"modified":"2007-01-19T09:54:27","modified_gmt":"2007-01-19T15:54:27","slug":"guide-to-deploying-svg-with-html","status":"publish","type":"post","link":"https:\/\/www.codedread.com\/blog\/archives\/2007\/01\/19\/guide-to-deploying-svg-with-html\/","title":{"rendered":"Guide to Deploying SVG with HTML"},"content":{"rendered":"<p>Early in 2005 I started getting interested in <a href=\"http:\/\/www.w3.org\/Graphics\/SVG\/\" title=\"Scalable Vector Graphics W3c Home Page\">SVG<\/a>, a web standard for vector graphics on web pages.  My efforts in this direction were first sparked by a <a href=\"http:\/\/rr.latenightpc.com\/wp\/\">friend<\/a> and later by the fact that modern browsers like <a href=\"http:\/\/www.mozilla.com\/firefox\/\">Firefox<\/a> and <a href=\"http:\/\/www.opera.com\/\">Opera<\/a> have introduced SVG support.  This entry is to serve as a guide so people can learn from my experiences.  It was originally published in Dec 2005, but I will continue to update it as more items occur to me.  It was last updated in Jan 2007.<\/p>\n<p><!--more--><\/p>\n<p><script type=\"text\/javascript\" src=\"http:\/\/www.codedread.com\/googleads.js\"><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script><\/p>\n<p><i>[Edit: Updated 2007-01-19 for <a href=\"#asv-workarounds\">ASV Workarounds<\/a>]<\/i><\/p>\n<div id=\"toc\" style=\"border-style:solid; margin:3px; padding: 3px; background-color: #ddd;\">\n<ul>\n<li><a href=\"#intro\">Introduction to SVG<\/a><\/li>\n<li><a href=\"#Implementations\">SVG Implementations<\/a><\/li>\n<li><a href=\"#includingSVG\">How To Include SVG Within HTML<\/a><\/li>\n<li><a href=\"#linkingSVG\">How To Link Between SVG and HTML Documents<\/a><\/li>\n<li><a href=\"#compliantSVG\">How To Write Compliant SVG<\/a><\/li>\n<li><a href=\"#asv-workarounds\">Working Around Adobe SVG Viewer<\/a><\/li>\n<\/ul>\n<\/div>\n<h2 id=\"intro\">Introduction To SVG  <a href=\"#toc\" style=\"font-size:x-small; color:blue\">[TOC]<\/a><\/h2>\n<p>Since the very early days of the web, HTML has the capacity to display text and hyperlinks inline with graphics.  For the most part, graphics have been <a href=\"http:\/\/en.wikipedia.org\/wiki\/GIF\" title=\"Wikipedia article on the Graphics Interchange Format\">GIF<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/JPEG\" title=\"Wikipedia article on the Joint Photographic Experts Group image format\">JPEG<\/a> and more recently <a href=\"http:\/\/en.wikipedia.org\/wiki\/PNG\" title=\"Wikipedia article on the Portable Network Graphics format\">PNG<\/a>, which are all raster graphics - meaning the image file contains the pixel information that should be displayed.  SVG and other similar formats (like Microsoft's <span class=\"definition\" title=\"Vector Markup Language\">VML<\/span>) describe vector graphics, which describe their images in terms of mathematics (i.e. they tell the browser <em>how<\/em> to draw the image).  The benefits of this are that vector graphics display perfectly at any resolution (i.e. \"scalable\") and, with some exceptions, can be described in less disk space.  The tradeoff is some interpretation cost (i.e. rasterization) at the client end.  With upcoming hardware acceleration (see <a href=\"http:\/\/www.khronos.org\/openvg\/\" title=\"OpenVG Overview - Vector Graphics Acceleration\">OpenVG<\/a>) this could be alleviated also.<\/p>\n<p>Anyway, all that aside, if you need a brief introduction to SVG, please feel free to read my first two SVG Kickstart Tutorials:  <a href=\"http:\/\/www.codedread.com\/SVGKS_1a.php\" title=\"SVG Kickstart 1\">One<\/a> and <a href=\"http:\/\/www.codedread.com\/SVGKS_2a.php\" title=\"SVG Kickstart 2\">Two<\/a>.  They give an overview of basic SVG functionality including how to draw simple and complex shapes, tools you can use and why SVG is important.  This blog entry will be focused on integrating SVG into your web pages and the current difficulties imposed by various platform implementations quirks and differences.<\/p>\n<h2 id=\"Implementations\">SVG Implementations <a href=\"#toc\" style=\"font-size:x-small; color:blue\">[TOC]<\/a><\/h2>\n<p>At the time of my original foray into this experience (Spring of 2005), the most well-deployed implementation for SVG by far was Adobe's SVG Viewer (known as ASV), which is a plugin for most web browsers.  In the last couple years, both Mozilla and Opera have included native SVG support and Safari is working away on it.  As a result of my target implementation platforms for SVG are primarily :<\/p>\n<ul>\n<li>Internet Explorer 6 (IE6) with Adobe SVG Viewer 3.0x and ASV 6 (pre)<\/li>\n<li>Firefox 1.5+ with native SVG support<\/li>\n<li>Opera 9+ with native SVG support<\/li>\n<\/ul>\n<p>Note that Konqueror also has some support for SVG which is steadily improving.<\/p>\n<p>Ok, here are some of the issues you'll face when integrating SVG with your HTML pages:<\/p>\n<p><script type=\"text\/javascript\" src=\"http:\/\/www.codedread.com\/googleads.js\"><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script><\/p>\n<h2 id=\"includingSVG\">How To Include SVG Within HTML <a href=\"#toc\" style=\"font-size:x-small; color:blue\">[TOC]<\/a><\/h2>\n<p>There are actually a lot of potential choices here.  The following elements could support referencing an SVG image within an HTML page:  <em>&#60;object&#62;, &#60;embed&#62;, &#60;img&#62;, &#60;iframe&#62;<\/em>.  Furthermore, if you want to use an SVG image as a background or a list bullet, the CSS <em>'background-image'<\/em> and <em>'list-style-image'<\/em> are also candidates.<\/p>\n<p>Now here's the ugly reality:  No implementations currently support HTML <em>&#60;img&#62;<\/em> or CSS <em>'background-image'<\/em> and <em>'list-style-image'<\/em> <i>[Update 2008-02-16:  Opera 9.5 will support this]<\/i>.  This is unfortunate, since providing scalable backgrounds to <em>&#60;div&#62;<\/em>s within HTML pages could be a great way to get rounded corners on web pages instead of ugly hacks like <a href=\"http:\/\/blogs.msdn.com\/ie\/archive\/2005\/06\/23\/431980.aspx\">this<\/a> or waiting for <a href=\"http:\/\/www.w3.org\/Style\/CSS\/\">CSS3<\/a> implementations.  Anyway, without these, that leaves <em>&#60;object&#62;, &#60;iframe&#62;<\/em> and the non-standard <em>&#60;embed&#62;<\/em>.<\/p>\n<p>Of the remaining candidates, <em>&#60;object&#62;<\/em> is the most reasonable solution because it allows fallback content to be displayed if the user agent does not support SVG rendering.  This is important - if a user doesn't have a browser that supports SVG, they may not want to download Adobe's plugin, which means they can't see your content unless you can provide fallback content in terms of PNG or whatever.<\/p>\n<p>However, in my experience ASV seems to have inconsistent results with <em>&#60;object&#62;<\/em>, while I have found that <em>&#60;embed&#62;<\/em> works reliably in ASV.  Firefox and Opera do not like <em>&#60;embed&#62;<\/em> and seem to work reliably with <em>&#60;object&#62;<\/em>.  Frustration!  My experience with <em>&#60;iframe&#62;<\/em> is limited because I <em>want<\/em> to use <em>&#60;object&#62;<\/em>, but I do not know of any issues with it.<\/p>\n<p>My solution to this dilemma was to provide <em>&#60;object&#62;<\/em> for non-IE browsers and <em>&#60;embed&#62;<\/em> in IE browsers.  I had done this using some JavaScript that transforms <em>&#60;object&#62;<\/em> elements into <em>&#60;embed&#62;<\/em> elements if IE is used and ASV is installed.  You can see the JS <a href=\"http:\/\/www.codedread.com\/lib\/svglib.js\">here<\/a>.<\/p>\n<p>The problem with this script is that it needs to be run when the page loads, which causes some delay in rendering and turns out to ultimately be unnecessary.  <a href=\"http:\/\/oskamp.dyndns.org\/SiemensClock\/SVG\/SiemensClock.xhtml\">Stefan Oskamp<\/a> gave me the tip of using <a href=\"http:\/\/msdn.microsoft.com\/workshop\/author\/dhtml\/overview\/ccomment_ovw.asp\">IE conditional comments<\/a>.  With this technique you can serve an <em>&#60;embed&#62;<\/em> to IE and an <em>&#60;object&#62;<\/em> to every other browser:<\/p>\n<div class=\"code\">\n&#60;!&#150;&#150;[if IE]><br \/>\n&#160;&#160;&#60;embed src='mysvgfile.svg'>&#60;\/embed><br \/>\n&#60;![endif]&#150;&#150;><br \/>\n&#60;![if !IE]><br \/>\n&#160;&#160;&#60;object data='mysvgfile.svg' type='image\/svg+xml'><br \/>\n&#160;&#160;&#160;&#160;&#60;p>Please download &#60;a href='http:\/\/www.mozilla.com\/firefox\/'>Firefox 1.5&#60;\/a>.&#60;p><br \/>\n&#160;&#160;&#60;\/object><br \/>\n&#60;![endif]>\n<\/div>\n<p>One final point:  Both Firefox and Opera provide a way to inline SVG with XHTML.  This means that you can have an XHTML document with SVG elements inside it (not referenced to another document).  The issue is that IE does not support XHTML or mixed XML grammars at this time (and is unlikely to for awhile).  If you'd like to constrain your audience to just Firefox and Opera users, feel free to use XHTML with SVG content and keep your eye on the <a href=\"http:\/\/www.w3.org\/2004\/CDF\/\" title=\"Compound Document Format W3C Web Page\">CDF Working Group<\/a>.<\/p>\n<p><script type=\"text\/javascript\" src=\"http:\/\/www.codedread.com\/googleads.js\"><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script><\/p>\n<h2 id=\"linkingSVG\">How To Link Between SVG and HTML Documents <a href=\"#toc\" style=\"font-size:x-small; color:blue\">[TOC]<\/a><\/h2>\n<p>The next issue I found was in managing hyperlinks across SVG and its parent HTML document.<\/p>\n<p><i><b>Update 2007-01-17:<\/b>  In fairness, I should note that Opera 9 and Firefox 2 have fixed numerous issues with linking so that now a semi-sane solution is quite deployable.  That means another year or two from now (when Opera 8 and Firefox 1.5 have faded from view), I can update my website.  Such is the life of the web developer...<\/i><\/p>\n<p>HTML provides support for hyperlinking using the <em>&#60;a&#62;<\/em> element.  This element allows you to specify the target \"frame\" of the new link.  In default cases, this means when you click on a link, the enclosing HTML frame gets replaced by the contents at the new link.  If you're using HTML frames and you wish to replace the entire page (i.e. the \"top\" frame) you need to specify the target attribute to be equal to \"_top\".<\/p>\n<p>SVG also provides support for hyperlinking within an SVG document using a similar <em>&#60;a&#62;<\/em> element.  Unfortunately, the default targetting behavior when a link is accessed (clicked) is not consistent across implementations.<\/p>\n<p>Let's say we have the following four files.<\/p>\n<p><a href=\"http:\/\/www.codedread.com\/testcc.html\">testcc.html<\/a>:<\/p>\n<div class=\"code\">\n<p>&#60;html>&#60;body><br \/>\n&#160;&#160;&#60;p>This is the upper paragraph.&#60;\/p><\/p>\n<p>&#160;&#160;&#60;!--[if IE]><br \/>\n&#160;&#160;&#160;&#160;&#60;embed src='twolinks.svg'>&#60;\/embed><br \/>\n&#160;&#160;&#60;![endif]--><br \/>\n&#160;&#160;&#60;![if !IE]><br \/>\n&#160;&#160;&#160;&#160;&#60;object data='twolinks.svg' type='image\/svg+xml'>No SVG Support!&#60;\/object><br \/>\n&#160;&#160;&#60;![endif]><\/p>\n<p>&#160;&#160;&#60;p>This is the lower paragraph.&#60;\/p><br \/>\n&#60;\/body>&#60;\/html><\/p>\n<\/div>\n<p><a href=\"http:\/\/www.codedread.com\/twolinks.svg\">twolinks.svg<\/a>:<\/p>\n<div class=\"code\">\n&#60;?xml version='1.0'?><br \/>\n&#60;svg xmlns='http:\/\/www.w3.org\/2000\/svg' xmlns:xlink='http:\/\/www.w3.org\/1999\/xlink'><br \/>\n&#160;&#160;&#60;a xlink:href='testtarget1.html'>&#60;text x='20' y='25' stroke='green'>Link 1&#60;\/text>&#60;\/a><br \/>\n&#160;&#160;&#60;a xlink:href='testtarget2.html'>&#60;text x='20' y='55' stroke=\"blue\">Link 2&#60;\/text>&#60;\/a><br \/>\n&#60;\/svg>\n<\/div>\n<p><a href=\"http:\/\/www.codedread.com\/testtarget1.html\">testtarget1.html<\/a>:<\/p>\n<div class=\"code\">\n&#60;html>&#60;body>&#60;p>Test Target 1&#60;\/p>&#60;\/body>&#60;\/html>\n<\/div>\n<p><a href=\"http:\/\/www.codedread.com\/testtarget2.html\">testtarget2.html<\/a>:<\/p>\n<div class=\"code\">\n&#60;html>&#60;body>&#60;p>Test Target 2&#60;\/p>&#60;\/body>&#60;\/html>\n<\/div>\n<p>If you click on <a href=\"http:\/\/www.codedread.com\/testcc.html\">testcc.html<\/a> you will see two paragraphs surrounding the SVG document (which contains two links).  When you click on a SVG link in IE+ASV, the entire web page will be switched to the corresponding testtarget HTML document.  If you click on a SVG link in Firefox or in Opera 8.x, only the SVG document will be switched out for the appropriate testtarget HTML document (in other words if you clicked on \"Link 1\", you'd have testtarget1.html embedded within testcc.html).  Opera 9 TP actually switches this behavior to follow IE's approach.<\/p>\n<p>I'm not clear on what the correct behavior is here - maybe it is unspecified, but I tend to side with Firefox and Opera 8.51 on this one.  The SVG link is with respect to the document in which it is located (i.e. twolinks.svg) and not within a parent document.  Behavior should be consistent whether the SVG document is linked to directly or referenced from within a containing HTML document.<\/p>\n<p>Anyway, differences aside, the question becomes:  How do I get consistent behavior?<\/p>\n<p>For my experience, I actually WANTED an SVG link to result in the entire web page being switched for its target.  In this respect, it <em>should<\/em> have been as simple as adding <em>target=\"_top\"<\/em> to the svg:a elements as specified <a href=\"http:\/\/www.w3.org\/TR\/SVG\/linking.html#hyperlinkAttributesDefinition\">here<\/a>.<\/p>\n<div class=\"code\">\n&#60;?xml version='1.0'?><br \/>\n&#60;svg xmlns='http:\/\/www.w3.org\/2000\/svg' xmlns:xlink='http:\/\/www.w3.org\/1999\/xlink'><br \/>\n&#160;&#160;&#60;a xlink:href='testtarget1.html' <strong>target='_top'<\/strong>>&#60;text x='20' y='25' stroke='green'>Link 1&#60;\/text>&#60;\/a><br \/>\n&#160;&#160;&#60;a xlink:href='testtarget2.html' <strong>target='_top'<\/strong>>&#60;text x='20' y='55' stroke=\"blue\">Link 2&#60;\/text>&#60;\/a><br \/>\n&#60;\/svg>\n<\/div>\n<p>Unfortunately, this <strong>does not work<\/strong> with either Firefox or Opera 8.x.  What I did next was add in a JavaScript hack to get Firefox to work:<\/p>\n<div class=\"code\">\n&#60;?xml version='1.0'?><br \/>\n&#60;svg xmlns='http:\/\/www.w3.org\/2000\/svg' xmlns:xlink='http:\/\/www.w3.org\/1999\/xlink'><br \/>\n&#160;&#160;&#60;a xlink:href='testtarget1.html' target='_top'><br \/>\n&#160;&#160;&#160;&#160;&#60;text x='20' y='25' stroke='green' <strong>onclick=&#34;top.location.href='testtarget1.html';&#34;<\/strong>>Link 1&#60;\/text><br \/>\n&#160;&#160;&#60;\/a><br \/>\n&#160;&#160;&#60;a xlink:href='testtarget2.html' target='_top'><br \/>\n&#160;&#160;&#160;&#160;&#60;text x='20' y='55' stroke=\"blue\" <strong>onclick=&#34;top.location.href='testtarget2.html';&#34;<\/strong>>Link 2&#60;\/text><br \/>\n&#160;&#160;&#60;\/a><br \/>\n&#60;\/svg>\n<\/div>\n<p>Now it works properly in Firefox 1.5, but since Opera 8.x does not support JS scripting of the SVG DOM, the above hack does not work.  What I resorted to then was a hack that I'm not proud of.  Basically I put the following \"frame-busting\" JavaScript at the top of all my HTML pages by using some PHP templating:<\/p>\n<div class=\"code\">\n&#160;&#160;function bustFrames() {<br \/>\n&#160;&#160;&#160;&#160;if (top != self) top.location.href = &#34;&#60;?php echo $_SERVER['PHP_SELF']; ?>&#34;;<br \/>\n&#160;&#160;}\n<\/div>\n<p>This works in Opera 8.x, but only partially.  You still see the target document load up in the <em>&#60;object&#62;<\/em> frame and then almost immediately the entire page switches to the target document.  What a fugly hack!  Unfortunately, Opera 9 TP1 \"fixes\" this by resorting to switching the entire enclosing document for the target one, even if target is not specified.  I will be in contact with Opera developers for them to fix this as I consider it a bug (i.e. they should support the <a href=\"http:\/\/www.w3.org\/TR\/SVG\/linking.html#hyperlinkAttributesDefinition\">standard specification<\/a>).<\/p>\n<p>It should be noted that the <a href=\"http:\/\/www.w3.org\/2004\/CDF\/\">Compound Document Framework<\/a> seeks to address issues like this and may be of interest.<\/p>\n<h2 id=\"compliantSVG\">How To Write Compliant SVG <a href=\"#toc\" style=\"font-size:x-small; color:blue\">[TOC]<\/a><\/h2>\n<p>An unfortunate side effect of having Adobe's SVG Viewer become the defacto implementation is that ASV accepts noncompliant SVG documents.  The biggest \"mistake\" I've seen is that ASV does not require XML namespaces to be bound.<\/p>\n<p>Firefox requires the SVG namespace to be mentioned (bound) in the <em>&#60;svg&#62;<\/em> element.  On the other hand, Opera's native implementation does not require this, meaning that Firefox may be right, but they are in the minority.  Jonathan Watt (of the Firefox SVG team) has provided some <a href=\"http:\/\/jwatt.org\/svg\/authoring\/\">great authoring guidelines<\/a> that describe this and other issues for bringing SVG documents into compliancy.<\/p>\n<p>Opera developers should follow Firefox's lead here and enforce stricter compliancy as well, otherwise the web will forever be littered with noncompliant SVG documents.  We need to fix developer habits <em>now<\/em>.  As XML grammars become further integrated, namespaces become a very important issue.<\/p>\n<h2 id=\"asv-workarounds\">Working Around Adobe SVG Viewer <a href=\"#toc\" style=\"font-size:x-small; color:blue\">[TOC]<\/a><\/h2>\n<p>I'm writing this section because I found these couple \"gotchas\" and I know others have stumbled across them as well.  The Adobe SVG Viewer (ASV) actually uses a very old version of the Mozilla scripting engine, and there are a couple issues with this to keep in mind when writing SVG for ASV :<\/p>\n<h3 id=\"nodelist\">Beware Of The NodeList <a href=\"#toc\" style=\"font-size:x-small; color:blue\">[TOC]<\/a><\/h3>\n<p>Some DOM methods like <a href=\"http:\/\/www.w3.org\/TR\/DOM-Level-2-Core\/core.html#ID-1938918D\">getElementsByTagName()<\/a> return <a href=\"http:\/\/www.w3.org\/TR\/DOM-Level-2-Core\/core.html#ID-536297177\">NodeList<\/a> objects.  A NodeList object is a collection of live DOM nodes that you can then work with.  The <a href=\"http:\/\/www.w3.org\/TR\/DOM-Level-2-Core\/ecma-script-binding.html\">JavaScript bindings<\/a> state that NodeList objects can be operated on using the array-index operators (square-brackets) to get at an individual node.  As a result, you'll often want to write code like this:<\/p>\n<div class=\"code\">\nvar allPaths = document.getElementsByTagName(\"path\");<br \/>\nalert( allPaths[0].id );\n<\/div>\n<p>Unfortunately this won't work in ASV because ASV does not support using square-brackets on NodeList objects.  If you want code that works in Firefox, Opera and ASV, you should rewrite your code using the NodeList item() method instead like so:<\/p>\n<div class=\"code\">\nvar allPaths = document.getElementsByTagName(\"path\");<br \/>\nalert( allPaths.item(0).id );\n<\/div>\n<p>The above code will work in all fully-DOM compliant user agents as well as ASV.<\/p>\n<h3 id=\"timers\">setTimeout and setInterval <a href=\"#toc\" style=\"font-size:x-small; color:blue\">[TOC]<\/a><\/h3>\n<p>JavaScript uses setTimeout() and setInterval() methods as ways to delay execution of code or repeatedly execute code.  You will want to write code like this:<\/p>\n<div class=\"code\">\n<p>function func1(str) { alert(str); }<br \/>\nfunction func2() { alert(\"Five seconds!\"); }<\/p>\n<p>setTimeout(func1(\"howdy\"), 2000); \/\/ call func1(\"howdy\") after 2 secs<br \/>\nsetInterval(func2, 5000); \/\/ call func2() every 5 secs<\/p>\n<\/div>\n<p>You can even do:<\/p>\n<div class=\"code\">\nsetTimeout(new function() { alert(\"howdy!\"); }, 2000);\n<\/div>\n<p>Unfortunately, ASV does not like this - ASV only expects a string as the first argument in the setTimeout() and setInterval() functions.  This string will then be eval'ed and executed, so it's pretty close to the same thing, but not quite.  So to make your code work in Firefox, Opera and ASV you should rewrite your code like this:<\/p>\n<div class=\"code\">\n<p>function func1(str) { alert(str); }<br \/>\nfunction func2() { alert(\"Five seconds!\"); }<\/p>\n<p>setTimeout(\"func1('howdy')\", 2000); \/\/ call func1('howdy') after 2 seconds<br \/>\nsetInterval(\"func2()\", 5000); \/\/ call func2() every 5 seconds<\/p>\n<\/div>\n<p><script type=\"text\/javascript\" src=\"http:\/\/www.codedread.com\/googleads.js\"><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Early in 2005 I started getting interested in SVG, a web standard for vector graphics on web pages. My efforts in this direction were first sparked by a friend and later by the fact that modern browsers like Firefox and Opera have introduced SVG support. This entry is to serve as a guide so people [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,38,41,25,46,11,28,30],"tags":[],"class_list":["post-188","post","type-post","status-publish","format-standard","hentry","category-firefox","category-javascript","category-opera","category-software","category-svg","category-technology","category-web","category-xml"],"_links":{"self":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":0,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}