News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Short Links

Started by Joshua Dickerson, November 03, 2009, 05:03:22 AM

Previous topic - Next topic

Joshua Dickerson

Link to Mod

Save bandwidth by reducing your links from their full location (http://www.yoursite.com/forum/index.php) to a shortcut (index.php). If the Simple Machines Community Forum did this, it would save around 20KB per pageview on the board index alone! Let me know if there are any bugs or if there are more places this can be done. It is very simple modification - just changing $scripturl.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Arantor


netoya

Is it saves only on board index or also in topics?

Arantor

Throughout the entire forum - every single page. groundup just quoted that one page as an example.

netoya

Installed but don't see any changes. Is it in html-code only? all links still have http://www.yoursite.com/forum/...

Arantor

Have a look at the HTML. The links won't contain the first part of the link in, but your browser still displays it because that's where the link will ultimately go.

netoya


Arantor

That's because they're not driven from the same place, and it's not something that can be reliably removed by a mod (ever).

netoya

   
Unfortunately uninstalled :(  mail notification on topic new post is now also trimmed: index.php?topic=7819.new;topicseen#new

Filipina

Quote from: Arantor on November 03, 2009, 09:55:09 AM
Have a look at the HTML. The links won't contain the first part of the link in, but your browser still displays it because that's where the link will ultimately go.

Yep very true... example of source code on board links

"index.php?board=225.0"

I am not sure if it is the MOD, but my forum seems to have more juice now :) What a great idea. Thanks groundup! 

Arantor

@netoya: That one's a bug, unfortunately.

I'm sure groundup will take a look shortly to fix this one.

@Filipina: It will a little faster since there is physically less data being moved around.

Filipina

Quote from: netoya on November 03, 2009, 10:09:26 AM
   
Unfortunately uninstalled :(  mail notification on topic new post is now also trimmed: index.php?topic=7819.new;topicseen#new

Hmmm.... that could be a problem

Filipina

Ok I will uninstall for now, but this appears to be a great feature once that bug is worked out :)

Joshua Dickerson

Yeah, I'll fix it in a little bit. Just need to change $scripturl in Subs-Post.php to either $boardurl or make it concatenated.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

sportin3

Does this mod have any impact on search engines and their ability to index your site?

Joshua Dickerson

It shouldn't have any negative impact. Though, I don't work for any search engines.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Arantor

Won't break search engines, at least, not properly written ones, since all this does is revert from absolute links to relative ones, which goes back to HTML 1.0. Most of the web would not be indexed if relative links didn't exist.

sportin3

I installed the mod and tested it. The file size was about 40k smaller 0n my site. It defiantly made my site run faster but I had to uninstall it due to a bug it was causing in my site. Everything looked good until I would click on the home button in the top menu. It was giving my a concatenated url that was a mix of the url I was just at and the index url.

Tiribulus

I will be interested to see how this develops.

LHW

Has anyone tested this with SMG?


Advertisement: