SEO Friendly DataTables
SEO Friendly DataTables
Since a couple of days i am searching for a good solution with responsive tables, so i found datatables.net. I was already reading on the website of DataTables, but i could not find easly information about SEO (search engine optimalisation) in combination with DataTables.
The number of rows can be very large, so probably i have to choose for server-side processing.
I was searching for a solution which includes:
Firstable all the content must be searchable by search engines. With server-side processing that's possible, right?
What i can not find, is information about seo friendly urls. Not only for seo, but for example i want to send someone a link to a specific page number, to a specific search or to a specific "sort by". The parameters are not in the url and the url is also not changing. Are there solutions for that? (this is my most important question)
Last a little bit other question. I think if i would dive more into DataTables i would already know, but with server-side processing the data goes probably through AJAX. If there is a case it's about private data, probably it's secure. How it's working...i have to put the login into the ajax call and then it's safe and DataTables is arranging the rest? Or what is in short the basic behind the security of the data if it's data in a CMS or something.
This question has accepted answers - jump to:
Answers
One more question, because i'm in doubt about how i wanna do it. In this case i am thinking of 2 solutions:
i want to do the "sort by" by myself to put a link in the header columns. I did not really see default solutions for that? Can i find more about that somewhere?
Which solution you recommend? A search option, i would also make by myself in that case (client). About the search in combination with DataTables i have another question.
If i have 30 database columns and i only want to show 4 columns in the html table...but the search has to go through all the 30 columns (also columns with a lot of text). If i would use solution 1 (server-side processing), probably everytime all the data is retrieved from the database to do that search, right? So maybe in cases like that it's better to go for solution 2 or am i wrong?
It looks like otherwise the script is doing a lot of extra work:
Server-side processing isn't great for SEO since it will only load a sub-set of the rows until the table is interacted with. Thus the search engine can only index the first page.
Really, the only option if you want all rows to be fully indexed is a DOM sourced table. You could use Ajax sourced, that will be rendered by most spiders now, but you again run into the data hidden by paging issue.
As in the URL tells DataTables what page to show? That isn't a feature of DataTables. You could probably implement it via the API though.
The security is absolutely up to yourself. Typically you would have the Ajax source check that the user is in a valid login session and is allowed access to the data before it sends it to the user.
Obviously if they need a login to view the data, then no spider is going to crawl it for indexing at all.
Allan
Thanks for the answers!
So it's 2016 and DataTables is making a plugin and seo is not a priority??? Then probably they did not make the plugin for public websites? For what kind of use they made it initially?
Because if i am searching for useful plugins then of course the first question is:
Is it seo friendly including seo friendly urls etcetera...
It looks like it was not the first priority with DataTables?
There isn't such a plug-in for a couple of reasons:
1) Its trivial to implement yourself - use
displayStart
and get the page number from the query string usingwindow.location
- a single line the in the DataTables inititlisaiton would do it. Then you just need to have the URLs reflect the page numbers.2) Interpreting parameters from URLs isn't a plug-in I have developed as I'm just one person running this project and haven't been able to focus on that yet.
Allan
Thanks for the reply and the answers!
I am suprised that noone already jumped into the seo friendly urls. But i can understand that if you have to do everything by yourself that it is another story. Maybe people have to make a priority of that, because i think it's an important thing and one of the first things people are looking for.
But it's easy talking on the sideline...i also have no time and first i will dive into DataTables itself, before i can even make some extra options for myself. Anyway, besides the seo aspects it looks really good!