meteorhacks / inject-data

A way to inject data to the client with initial HTML
MIT License
18 stars 27 forks source link

Inject data only when renders via Meteor #2

Open timbrandin opened 9 years ago

timbrandin commented 9 years ago

Look for text/html in the content type on the request to better decide when to inject fast render data.

arunoda commented 9 years ago

I've another suggestion to make this work.

Does that suits with your use case?

timbrandin commented 9 years ago

Oh, yeah that would work. I guess in my use case I'm still rendering via Meteor but don't want the big script tag for _escaped_fragment_ requests.

timbrandin commented 9 years ago

I wonder if you get the script tag on SSR for E-mail too?

arunoda commented 9 years ago

Okay. Then let's do a check for the URL for _escaped_fragment_ too.

timbrandin commented 9 years ago

The URL doesn't seem to be available in the current context. Any ideas?

arunoda commented 9 years ago

Yes. Then let's do that check in the fast-render.