Skip to content

How to support autoload reasonably? #119

Open
@fno2010

Description

@fno2010

I found matchingUrls (which is the mechanism used by vimperator to implement plugins' autoload) is really not a good idea to autoload plugins. See #117

In the dynamic websites, http servers will use route to select which pages should be rendered. So URL does often not direct a static file.

For example, https://github.com///blob///.pdf will not direct a PDF file. Github will open a webpage with its own online pdf reader to display this PDF file. So PDF.js will not be loaded by FireFox.

But https://raw.githubusercontent.com/////.pdf will response a PDF file via HTTPS. The media type of its HTTPS response is application/pdf. So FireFox will load PDF.js.

I think there are two potential solutions:

  1. Use HTTP header matching (not url matching) to autoload. We can match different mediatype.
  2. Use DOM detecting to autoload. Plugin authors need to define DOM detectors like ftdetect in vim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions