News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Trimmed URLs in source

Started by aED, June 09, 2009, 04:02:04 AM

Previous topic - Next topic

aED

Hi,

I want to request to recode all links just like other forum softwares

for example when viewing the html sources it would look like


<body>
<div id="mainframe">
<div id="header" class="clearfix">
<ul>
<li><a href="http://www.simplemachines.org/">Home</a></li>
<li><a href="/community/index.php" class="active">Community</a></li>
<li><a href="http://download.simplemachines.org/">Download</a></li>
<li><a href="http://custom.simplemachines.org/">Customize</a></li>
<li><a href="http://support.simplemachines.org">Support</a></li>
<li><a href="http://docs.simplemachines.org/">Docs</a></li>
<li><a href="http://www.simplemachines.org/about/">About</a></li>
</ul>
</div>
<div id="frame">
<div id="toparea">
<div id="headersection" class="clearfix fullwidth">
<div id="userbox" class="clearfix">
<div id="smallavatar"><a href="/community/index.php?action=profile" title="Go to your profile!"><img src="/community/custom_avatars/avatar_174723.png" alt="" class="avatar" border="0" /></a></div>


Some of the links would be relative like this

<a href="/community/index.php?action=profile" title="Go to your profile!">

that can reduce the size of the page!

Dannii

With GZip encoding it shouldn't make a significant size difference.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

aED

Actually its not only for the size but we have other purpose for that like here in the Philippines most of my members are using their phones and they are using some tricks to lessen their bills and that trick requires the links to be relative so that it would be easier for them to browse the forum. It might not make sense to you but having relative links to my forum really matters. Hehehehe I already made it in my forum but I would be happy if it would be integrated in future releases besides other forum softwares have links like that.

Thanks

Dannii

You can manually change $scripturl in QueryString.php, but be careful doing that.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

aED

Quote from: Arantor on June 09, 2009, 10:12:39 AM
Interesting.

I'm curious - how does shortening the link to relative reduce the bill other than by physically making the page a few bytes shorter per link?

It is actually a hole in the network you just need to prepend a string to the url and links should be relative so that you dont need to manually add them again everytime you visit another link.

Advertisement: