FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


"site/page" DIFFERENT from "site/page/"?





likeabreeze
Is "http://site.com/about" DIFFERENT from "http://site.com/about/"?
I bet all of you would say NO...
But, Google says yes...
Use Google's PageSpeed Insights (https://developers.google.com/speed/)
and do this experiment...
type two of them into the textbox respectively, and get the result....
In my experiment,
"http://***.com/about/" got an overall PageSpeed Score of 99
while
"http://***.com/about" got an overall PageSpeed Score of 88
and for the latter,
google gives a suggestion:Avoid landing page redirects
it says, To speed up page load times for visitors of your site, remove as many landing page redirections as possible, and make any required redirections cacheable if possible.
http://***.com/about is a permanent redirect to http://***.com/about/
Come on!
Does it suggest that the time it takes to view "/about/" and "/about" is different?
A little bit ridiculous....
if google is right, then why?how big is the gap, anyway?
manfer
First I would say they are different but not because of your concern. I mean about/ en about are not the same.

about/ is a request to a folder and the server is going to reply with the index file inside that folder (index.php, index.html, home.html...) as configured in server configuration, while about can be a request to a file or a folder. If there is a file named about then it is a request to a file, and if there is a folder named about then is a request to a folder.

-----------------------

But even considering about is a folder which is your concern I still will say yes they are different and google doesn't lie to you at all.

When you do a request to a folder without the trailing slash, about instead of about/, the server gives you a 301 Moved Permanently reply.

And when you request the folder about/ the server gives you a 200 OK reply and serves the content of the index.

So in the first request your browser makes a request to about, it receives the moved permantly to about/ reply, it does a new request to about/ and receives the content of the index page.

In the second request your browser makes a request to about/, and it receives the content of the index page.

The gap depends on the speed of the comunication between the client and the server. On actual speeds and for only one you won't notice anything but you can clearly understand you are at least doubling the comunication time. So if that happens to a lot of the resources on a request, yes it can finally impact the speed.
Peterssidan
Yeah, it's up to the server how it handles the URL. I made a quick test on my frihost account and it was easy to make about and about/ show different pages by using mod_rewrite.

Code:
RewriteEngine On

RewriteRule ^about/$ somePage.html
RewriteRule ^about$ someOtherPage.html
Related topics
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> SEO and Search Engines

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.