web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Web File vs Web Template
Power Pages
Answered

Web File vs Web Template

(0) ShareShare
ReportReport
Posted on by 7

Hello community,

 

I'm setting up a portal from scratch and I was wondering what's best practice, using Web files or Web Templates?

 

I've read that before you can use web files you have to delete the '.js' extension from your blocked file extensions.  Does this have disadvantages? Everyone can therefore start uploading JavaScript files, this does not feel secure.

But on the other hand, separate files seem more convenient.

BlockedExtensions.png

I'm planning on making a JavaScript bundle by using Typescript. If I would use Web Templates should I create 1 template file for the whole bundle?

 

It would be interesting to know the advantages and disadvantages of both.

 

Thanks in advance !

 

Regards,

Justine

Categories:
I have the same question (0)
  • Verified answer
    OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @JustineS ,

     

    Web Templates and Web Files have a completely different purpose. Web Files are using to store your portal assets (css, js, images). And Web Templates provide you with actual HTML code for your pages. You, of course, can write a js code as a part of your Web Template (and you often will) but is not a most reusable scenario if you want to use that code in multiple places. 

    Regarding js extension - yes by default you cannot use js files as attachments and you will need to remove it from System Settings. However, it is just one of the approaches. Another commonly used approach is to switch extension of your js files to something like .es or .myjs (or literally anything else) and upload it that way to the system. 

    Regarding best practices, I would advise checking this blog post from Arpit Shrivastava.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 78 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard