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

Announcements

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
DP_Prabh Profile Picture

DP_Prabh 41

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 31 Most Valuable Professional

#3
rezarizvii Profile Picture

rezarizvii 22

Last 30 days Overall leaderboard