veliovgroup / spiderable-middleware

🤖 Prerendering for JavaScript powered websites. Great solution for PWAs (Progressive Web Apps), SPAs (Single Page Applications), and other websites based on top of front-end JavaScript frameworks
https://www.npmjs.com/package/spiderable-middleware
BSD 3-Clause "New" or "Revised" License
38 stars 4 forks source link

Check if prerendering #4

Closed nicooprat closed 6 years ago

nicooprat commented 7 years ago

(Using Meteor) How can I check whether the code is currently being prerendered or not? Something like location.href.indexOf('?_escaped_fragment_=')? Thanks.

dr-dimitru commented 7 years ago

Hello @nicooprat ,

Not possible for right now. As we pretend to be a regular browser as much as possible. We will add this feature in next release.

dr-dimitru commented 6 years ago

Hello @nicooprat ,

Sorry for delay with this one. Now it's possible, see docs:

Thank you a lot for contribution 👍 Feel free to close if this solution fits your needs.

nicooprat commented 6 years ago

Thanks to you!