Why the need for comments in server-side includes?

Hi, I sometimes create a page and use a portion of that page (header, footer etc) to create an include-page. No problems. I might then change the name of the original file or delete it altogether but I’ve noticed the comments on top of the include file still refer to the original page it was taken from.

What’s the reason for having comments in the include page that mentions the original file and the dependencies (bootstrap, fontawesome, jquery etc)? Can they be removed or they helpful in some way?

These comments are required so you can see the include file rendered and working fine in Design View. That’s how the include file communicates with its parent page.
If you remove them, the include page will lose all the styles and functionality (in Wappler Design View).

So in short the answer is - these should not be removed :slight_smile:

2 Likes

Thanks Teodor, that’s good to know.

What do you suggest if the original file has been deleted but the comments still refer to the deleted file? I guess it’s only a Wappler display problem - i.e. it will still look OK on the web, right?

I need to create multiple headers and footers (all different content and colors) so it’s a little more complicated than a normal site. I might end up creating one template page with all the headers and footers and have all the includes refer to that single file otherwise I’ll have broken references all over the place. Cheers.