Re: Question about JSON-LD and searchengines

And again another astonishing answer. Me and Jarno (also SemWeb guy and
colleague) were having these question for weeks and you just answered them
all in one night. If there is a +1K button, I will hit that instantly ^^


On Tue, Sep 10, 2013 at 3:00 AM, Gregg Kellogg <gregg@greggkellogg.com>wrote:

> On Sep 9, 2013, at 5:48 PM, Ka-Sing Chou <ka-sing@quantumspork.nl> wrote:
>
> Omg, thanks for answering all those questions, here is one more:
>
> > "witness schema.org's problems with deploying a JSON-LD context at
> http://schema.org/"
>
> I have heard this remark a couple of times before but I don't completely
> grasp what it means. Could you elaborate on what "schema.org doesn't have
> a JSON-lD context" means?
>
>
> According to schema.org, including JSON-LD in HTML should be done using
> the script tag with type application/ld+json, and the JSON should include a
> @context of http://schema.org/, something like this:
>
> {
>   "@context": "http://schema.org/"
>   "@id": "http://greggkellogg.net/foaf#",
>   "name": "Gregg Kellogg",
>   ...
> }
>
> This tells a JSON-LD processor to dereference the context and apply that
> when interpreting the JSON-LD content. Right now, if you dereference
> http://schema.org/, no matter what ACCEPT header you use, you will always
> get back the HTML page.
>
> When a JSON-LD processor does this dereference, it always uses
> application/ld+json, to allow the target to participate in
> content-negotiation, and return a suitable result; this should be a JSON-LD
> context, which sets the vocabulary to http://schema.org/, and provides a
> number of type coercions for different defined terms (e.g., "url" should be
> an IRI, not a string). I know this is on their list of things to do, and
> until it is done, JSON-LD processes will either not interpret this
> correctly, or will need to rely on out-of-band information to know how to
> process the information.
>
> Gregg
>
> On Tue, Sep 10, 2013 at 2:21 AM, 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>
>>
>> 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)? 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? 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.
>>
>>
>> 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
>>
>
>
>
> --
> Met vriendelijke groet,
>
> Ka-Sing Chou
> 06 - 54 76 30 81
> ka-sing@quantumspork.nl
>
>
>


-- 
Met vriendelijke groet,

Ka-Sing Chou
06 - 54 76 30 81
ka-sing@quantumspork.nl

Received on Tuesday, 10 September 2013 01:09:27 UTC