Does HTTP URL parameter order matter for caching? [closed]
Asked Answered
M

1

6

Are the two URLs equivalent with respect to browser caching and website seo?

1 - http://example.com/resource.html?a=a&b=b
2 - http://example.com/resource.html?b=b&a=a

If the resource for the first URL is cached and the browser needs to find the resource for the second URL can it use the cached resource? I want to know about the caching because I can ensure all internal links use the same parameter order to increase cache performance.

Also, if my server treats these URLs as the same resource, which URL will be indexed by Google? With consideration to SEO, will this count as duplicate content? If so, I could use a 301 response to redirect to the correct URL. (This should also fix the caching problem.)

Milreis answered 16/5, 2015 at 16:19 Comment(1)
I'm voting to close this question as off-topic because it's not programming related may fit for webmasters.stackexchange.comGreenish
J
3

If the resource for the first URL is cached and the browser needs to find the resource for the second URL can it use the cached resource?

That is not certain. It depends on each browser implementation. But if you always use the same parameter order, then it is not an issue in the first place.

Also, if my server treats these URLs as the same resource, which URL will be indexed by google?

Both will be indexed by Google, but if you use canonical links or if you configure parameters in Google Webmaster Tools, then they can be treated as one when displaying search results (i.e., Google will give the preference to one URL and it will collect the PageRank and other signals from the other).

With consideration to seo, will this count as duplicate content? If so, I could use a 301 response to redirect to the correct URL.

Yes, it will be considered as duplicate content, because the URLs are different. Using a redirect in this case is shooting flies with a canon (IMHO), but it would work.

Joelynn answered 16/5, 2015 at 17:18 Comment(1)
Thanks for the explanation. I do always use the same parameter order for internal links but its possible for other websites to link to me with the wrong order. I think I will do the 301 redirects because they will rarely happen and it fixes the duplicate problems with just a few lines of code.Milreis

© 2022 - 2024 — McMap. All rights reserved.