Re: Question about JSON-LD and searchengines

On Sep 9, 2013, at 5:21 PM, Ka-Sing Chou <ka-sing@quantumspork.nl> wrote:

> What about this: <link rel="alternate" type="application/ld+json" href="[JSONLD_URL]">
> instead of this: <script rel="alternate" type="application/ld+json" scr="[JSONLD_URL]"></script>

Yes, the link element is correct, and it should be in the head section.

> I was like... if XML's (feeds) can have an alternate representation of a certain page, why can't JSON-LD do the same? Because, somehow inline JSON-LD doesn't make sense to me, I mean... what are the advantages to represent same data within a HTML document twice (JSON-LD + structured data)?

I understand that Google encourages this as it's easier for people to dump into JSON-LD then to properly generate microdata or RDFa. I don't think they follow rel=alternate references. As an alternative to including the JSON-LD within a script element, you could also markup the HTML with RDFa.

> In my opinion, this will only add more page size and loading time.
> The second thought I had was, why don't we serve JSON-LD or HTML depending on the expect-headers?

Content Negotiation is a reasonable way to do this; if you set ACCEPT: application/ld+json (among others), this will cause an appropriate configured site to deliever you the JSON-LD rather than, say, HTML. It's not easy for everyone to do this, witness schema.org's problems with deploying a JSON-LD context at http://schema.org/.

> So instead of including it by means of a <script> or <link> tag, we skip the HTML all together and directly have a server respond with the correct format. By doing this, it requires applications, such as search engines, less effort to retrieve the same content without being forced to parse it twice.

Search engines are looking at many things; perhaps some day they'll look at rel=alternate references too. From a developer's perspective, I agree that separating the representations makes sense, but a webmaster will just follow schema.org recipes.

Gregg

> On Mon, Sep 9, 2013 at 8:28 AM, Gregg Kellogg <gregg@greggkellogg.com> wrote:
> On Sep 8, 2013, at 5:03 PM, Ka-Sing Chou <ka-sing@quantumspork.nl> wrote:
> 
>> Dear all,
>> 
>> The last few days, I have been busy with the correctness of my JSON-LD format (thanks Gregg ^^). Now I got the correct format, is there any way to tell searchengines that my website uses JSON-LD?
>> I don't know if I am correct but I read (git issues) something like this:
>> 
>> If my url is https://www.seoprovider.nl/seo-pakketten/mkb-geavanceerd/
>> and my JSON-LD is located at https://www.seoprovider.nl/seo-pakketten/mkb-geavanceerd.jsonld
>> can't I use something like this:
>> 
>> <script type="application/ld+json" src="https://www.seoprovider.nl/seo-pakketten/mkb-geavanceerd.jsonld"></script>
>> 
>> or should I include the content of the JSON-LD within the script tag after I defined the data-context (which makes the HTML-document bigger)?
> 
> I can't speak for the search engines, but I believe you want to include your JSON-LD within the script tag, using content-type="application/ld+json" rather than reference it in an external file. Of course, you could also maintain the external version, and use a rel="alternate" to reference it, and a server-side include to include the body with a script tag.
> 
> Google's webmaster tools might help you with this.
> 
> Gregg
> 
>> Let me know.
>> -- 
>> Kind regards and big thanks in advance,
>> 
>> Ka-Sing Chou
> 
> 
> 
> 
> -- 
> Met vriendelijke groet,
> 
> Ka-Sing Chou
> 06 - 54 76 30 81
> ka-sing@quantumspork.nl

Received on Tuesday, 10 September 2013 00:31:02 UTC