Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prerender-vkshare-useragent

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prerender-vkshare-useragent

Prerender plugin that enables you to create snapshots that prepared for vkShare crawlers

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

prerender-vkshare-useragent

Prerender plugin that enables you to create snapshots that prepared for vk.com.

How it works

Prerender creates snapshots with PhantomJS useragent (like the following) even if the original request is from vk crawlers.

PhantomJS/x.x.x ...

If you prepare pages, layouts or styles for mobiles depends on those useragent, you need to be requested with mobile useragent.

So this plugin adds 'iPhone'(default) to the useragent when the original request is from mobile devices or bot.

PhantomJS/x.x.x ... iPhone

How to use

In your local prerender project run:

$ npm install prerender-vkshare-useragent --save

Then in the server.js that initializes the prerender:

server.use(require('prerender-vkshare-useragent'));

Using External Configuration

You can use the enviroment variable CUSTOM_USER_AGENT

export MOBILE_USER_AGENT=custom-user-agent
# default is 'vkShare'

Keywords

FAQs

Package last updated on 31 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc