Skip to content

Externalize jquery with jquery-rails gem and cdn option #7920

Open
@Tlazypanda

Description

@Tlazypanda

Please describe the desired behavior.
Currently the jquery is fetched from public/lib. We can add it as a jquery-rails gem and its cdn gem.
Cdn option will allow us to load jquery faster since it might be already present in the cache. If the cdn goes down then the jquery-rails gem will load jquery for us as a fallback. The link of the gems can be found here,here and here.

Most importantly it will allow us to run the application.js file with defer/asynvc attribute. Earlier it would not have been possible since jquery was present in application.js so if we tried to run it with async tab then inline scripts in html files requiring jquery would have through an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions