Skip to content

Avoids duplicate requests on the client, for requests that were already made when the application was rendered on the server side. #4

Description

@dgvozd

I'm using this template for my startup. It's a simple application that displays different restaurants on the map. A User can go to same restaurant and check details. On the server side I have an WEB API and for restaurant details page it looks like this: /api/unit/{Id} and returns a simple JSON. Universal renders the page on the server side and provides html document for the client. But then I can see that angular application uses the API and makes the same request on the server. I think we can avoid using the same API request to the server because all necessary data already in this html. For example right requests look like this:
current_result and contain an extra request on the client side:
extra_request
I think the request should look like this (without /api/unit/{id}):
should_be_result

The problem could be fixed with this solution https://github.com/angular/universal/tree/master/modules/common

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions