The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Optimal coding

View previous topic View next topic Go down

Solved Optimal coding

Post by BloodDrunk on May 1st 2017, 8:07 pm

Technical Details


Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome, Internet Explorer, Opera, Safari, Other
Who the problem concerns : All members
Forum link : http://www.nfssecrets.tk/

Description of problem

What would be the best way to use codes on the forum?
Is it fine if you create new javascript file every time you want to implement something, or having everything (that can be combined) in 1 JS file?

What are your thoughts?


Last edited by BloodDrunk on May 1st 2017, 11:46 pm; edited 2 times in total
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Optimal coding

Post by Justice™ on May 1st 2017, 8:17 pm

On my forum, I have a js for everything with placement on all pages, one for index etc. I don't think that it would make any difference making separate js files on combining codes into a single file.
avatar
Justice™
Forumember

Posts : 521
Reputation : 121
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: Optimal coding

Post by BloodDrunk on May 1st 2017, 9:13 pm

So I can simply create new js for each thing I want to add. Pretty good, imo.
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Optimal coding

Post by Justice™ on May 1st 2017, 9:17 pm

Yep, you can do that. There is a limit of the number of js files that you can have, 40 or something like that is the maximum.
avatar
Justice™
Forumember

Posts : 521
Reputation : 121
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: Optimal coding

Post by BloodDrunk on May 1st 2017, 10:16 pm

Now that's what I didn't know, so after all I should combine what I can combine..
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Optimal coding

Post by Justice™ on May 1st 2017, 10:20 pm

When I first started using forumotion, I had at least 30 javascripts on my forum. I was using anything I could find on the net. Just imagine how slow my forum was.
avatar
Justice™
Forumember

Posts : 521
Reputation : 121
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: Optimal coding

Post by BloodDrunk on May 1st 2017, 10:44 pm

Being slow is what I'm afraid of my forum becoming..
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Optimal coding

Post by SLGray on May 1st 2017, 11:41 pm

Combining them does somewhat help with speed. Just make sure that you combine ones that affect the same area, like all pages, in topics.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 40886
Reputation : 2776
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Optimal coding

Post by BloodDrunk on May 1st 2017, 11:46 pm

Yeah, I thought so same. So I combined em all into 2 JS's Very Happy
Better safe than sorry.
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Optimal coding

Post by APE on May 2nd 2017, 12:06 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules



avatar
APE
Manager
Manager

Male Posts : 11038
Reputation : 1036
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum