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

Inject data only when renders via Meteor #108

Open
delgermurun opened this issue Apr 20, 2015 · 12 comments
Open

Inject data only when renders via Meteor #108

delgermurun opened this issue Apr 20, 2015 · 12 comments

Comments

@delgermurun
Copy link

Don't inject when server side rendering.

@arunoda
Copy link
Contributor

arunoda commented Apr 20, 2015

Thanks for switching the issue.
I think I can check for something else or track if there are some data.
(Let's see)

On Mon, Apr 20, 2015 at 1:39 PM Delgermurun Purevkhuu <
[email protected]> wrote:

Don't inject when server side rendering.


Reply to this email directly or view it on GitHub
#108.

@timbrandin
Copy link

Is there a way I can take a look at this?

@arunoda
Copy link
Contributor

arunoda commented Apr 30, 2015

Actual code is in the inject data package. See: https://github.com/meteorhacks/inject-data/blob/master/lib/server.js#L29

We currently look it by the DOCTYPE and that's the issue.
If we can look for some other text which send by meteor initial page everytime, that's an easy fix.

@arunoda
Copy link
Contributor

arunoda commented Apr 30, 2015

Or may be you can remove that route from fast-render support.
Don't know that's possible.

@timbrandin
Copy link

Just my thought, we should look for the escaped_fragment and don't support those routes

@arunoda
Copy link
Contributor

arunoda commented Apr 30, 2015

Okay. That's a good point. We can remove that from google's bot.
For that check here: http://goo.gl/Rw2XQU

Then how about SSR?

@timbrandin
Copy link

Hmm, what do you mean? Like server side for any other request made by a server?

@arunoda
Copy link
Contributor

arunoda commented Apr 30, 2015

I mean HTML pages generated via may be my SSR package or via react or something. May be this is something for future discussion. Currently, I like the escape fragment check.

@timbrandin
Copy link

@timbrandin
Copy link

Seems to be the case that Content-Type is set to text/html when the request is made from the browser, in the other case with "?escaped_fragment=" it's not there. Could this work for the other use cases too @arunoda ?

@arunoda
Copy link
Contributor

arunoda commented May 1, 2015

Let's move the discussion there.

On Fri, May 1, 2015 at 5:49 PM Tim Brandin [email protected] wrote:

Seems to be the case that Content-Type is set to text/html when the
request is made from the browser, in the other case with "?
escaped_fragment=" it's not there. Could this work for the other use
cases too @arunoda https://github.com/arunoda ?


Reply to this email directly or view it on GitHub
#108 (comment)
.

@arunoda
Copy link
Contributor

arunoda commented May 10, 2015

I did some changes to make sure fast render runs only for HTML page requests.
That might fixed that. Check the latest version.
See: 9203dcb

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

3 participants