www.ragaming.fora.pl Forum Index
RegisterSearchFAQMemberlistUsergroupsGalleriesLog in
Benefits of RESTful URL

 
Reply to topic    www.ragaming.fora.pl Forum Index » Leave or Absence View previous topic
View next topic
Benefits of RESTful URL
Author Message
ertry03sn08




Joined: 06 May 2013
Posts: 2491
Read: 0 topics

Warns: 0/10
Location: England

Post Benefits of RESTful URL
Benefits of RESTful URL
One difference is that the second URL doesn't name the categories, so the client code and indeed human users need to look up some category name to number mapping page first,[link widoczny dla zalogowanych], store those mappings,[link widoczny dla zalogowanych], use them all the time,[link widoczny dla zalogowanych], and refresh the list when previously unknown categories are encountered etc. Given the first URL you necessarily know the categories even if the item page doesn't mention them (but the site may still need a list of categories somewhere anyway).
Another difference is that the first format encodes two levels of categorisation, whereas the second hides the number of levels. That might make things easier or harder depending on how variable you want the depth to be (now or later) and whether someone inappropriately couples code to 2level depth (for example, by parsing the URLs with a regexp capturing the categories using two subgroups). Of course, the same problem could exist if they couple themselves to the current depth of categories listed in a id>categorypath mapping page anyway.
The first form will be better indexed by search engines, and is more cache friendly. The latter is both an advantage (you can decrease the load on your server) and a disadvantage (you aren't necessarily aware of people revisiting your page, and page changes may not propagate immediately to the users: a little care must be taken to achieve this).
The first form also requires (somewhat) heavier processing to get the desired item from the URL.
If you can control the URL syntax,[link widoczny dla zalogowanych], I'd suggest something like:or better yet, through URL rewrite,where 12345 is the resource ID. Then when you access the data (which you would have done anyway), are able to do so quickly; and you just verify that the record does match cat1, cat2 and item. Experiment with page cache settings and be sure to send out ETag (maybe based on ID?) and LastModified headers, as well as checking IfModifiedSince and IfNoneMatch header requests.
Just by looking on both string you can intuitively sense which one is more relevant,[link widoczny dla zalogowanych].
The 1st one tells you upfront "Heck yes, Im all about Red Nike Shoes" while the 2nd one kinda mumbles "Red Nike Shoes? Did you meant item code 12345?"
Also,[link widoczny dla zalogowanych], Having part of the KW in the URL will help you get more relevancy and also it can help you win "longtail" goals without much work. (just having KW in URL can sometimes be enough)
But the issue goes even deeper.
The second type of URL includes parameters and those can (an 99.9% will) lead to duplicated content issue. When using parameters youll have to deal with questions like:
相关的主题文章:


[link widoczny dla zalogowanych]

Facts About Solar Energy


The post has been approved 0 times
Sat 7:56, 13 Jul 2013 View user's profile
Display posts from previous:    
Reply to topic    www.ragaming.fora.pl Forum Index » Leave or Absence All times are GMT + 2 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.
Regulamin