RSS Feed/News Use PrismJS autoloader to efficiently support all languages

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
25,999
Points
823

Reputation:

The bundled PrismJS only comes with support for certain pre-selected languages. There's a good chance that certain programming-oriented forums will be missing their language.

Instead of wrangling addons that aim to extend PrismJS, PrismJS provides an autoloader plugin that can automatically load languages from either bundled (but separate) files or a CDN. This should cut down on JS size (at the expense of more HTTP requests in certain cases, which isn't a problem with HTTP/2) and extend...

Read more

Continue reading...
 
Status
Not open for further replies.
Top