• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 my php files are a mess....need to clean up

Echelon

Active member
#1
Hello,

Need help urgent ;-)

too many white spaces in my php files [templates]

how to fix this in a simple way?

appreciate al the suggestions.


you see....lots of white spaces

from.png

realy needs to be like this

to.png
 

katsulynx

Well-known member
#2
Set the forum to debug mode, open up the Template Modification System and add a new modification for every single template replacing whitespaces with nothing. Even though I don't see any need to do that as whitespace is just whitespace and the user normally doesn't see it anyway.
 

Echelon

Active member
#3
Set the forum to debug mode, open up the Template Modification System and add a new modification for every single template replacing whitespaces with nothing. Even though I don't see any need to do that as whitespace is just whitespace and the user normally doesn't see it anyway.
so you mean......handwork ;-)
is there no automatic solution?
 

katsulynx

Well-known member
#6
Removing the whitespaces will save you a total of 10kb traffic per siteload. Removing a single avatar/image from the site saves equal or even more. As said most people won't even recognize because when they try to inspect your code, they will most likely do it with Firefox or Chrome and then normally open the code inspector, which removes the whitespaces automatically anyway.

After all, every XenForo board is running with that much whitespace and I haven't seen a single one going down due to this. You're probably getting more serverload by removing it then by letting it be where it is.
 

Echelon

Active member
#7
Removing the whitespaces will save you a total of 10kb traffic per siteload. Removing a single avatar/image from the site saves equal or even more. As said most people won't even recognize because when they try to inspect your code, they will most likely do it with Firefox or Chrome and then normally open the code inspector, which removes the whitespaces automatically anyway.

After all, every XenForo board is running with that much whitespace and I haven't seen a single one going down due to this. You're probably getting more serverload by removing it then by letting it be where it is.
wow...incredible reply! I will forward this to my experts. Thanks a lot!
 

katsulynx

Well-known member
#8
Sure. But to give them approvement: there sure was a time when you had to remove whitespaces due to "high traffic consumption", but by now, every industry nation and probably most of the rest of the world with internet connection is over that point where it needs to save every 10kb possible and if not, they probably won't visit forums anyway.