Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to support autoload reasonably? #119

Open
fno2010 opened this issue Jan 7, 2017 · 0 comments
Open

How to support autoload reasonably? #119

fno2010 opened this issue Jan 7, 2017 · 0 comments

Comments

@fno2010
Copy link
Contributor

fno2010 commented Jan 7, 2017

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant