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

No wasm mode #810

Merged
merged 7 commits into from
Feb 8, 2023
Merged

No wasm mode #810

merged 7 commits into from
Feb 8, 2023

Conversation

maxence-charriere
Copy link
Owner

Summary

  • Possibility to see pre-rendered page by adding the URL query ?wasm=false
  • Prerendered content is now at the same dom depth as the wasm rendered one

@maxence-charriere
Copy link
Owner Author

@oderwat after using pre-rendering for a while, I doubt the value of having the PreRenderer interface. I feel like just using the mount/nav flow on the server side would be the same.

Removing it might also simplify the code base and if something specific is done on the server side, we can still use if app.IsServer {}.

Do you use the PreRenderer? Any opinion about it?

@oderwat
Copy link
Sponsor Contributor

oderwat commented Feb 6, 2023

We do not use PreRender() right now. I wonder about the implications. I do not want to have Render() / OnMount() ever being called on the server because this would need changes to the code (to gate it everywhere "when on the server"), does it? For me and my idea about the PWA, there is no real valid HTML that I can create in the server. Maybe I did misunderstand you, though?

I would prefer a strict separation of what is rendered for and send to the browser and was is rendered in the client.

Perhaps my idea about this is wrong, but an SPA (PWA) just says, "there would be an app here if you had JavaScript activated, so long look at this information that is just not what it would be if you used the app" ;-)

@maxence-charriere maxence-charriere merged commit a313eaa into v9.7.0 Feb 8, 2023
@maxence-charriere maxence-charriere deleted the no-wasm-mode branch February 8, 2023 07:20
maxence-charriere added a commit that referenced this pull request Jun 27, 2023
* routing func support (#806)

* fix typo in defer documentation

* AppendClass helper takes variadic parameters

* Update README.md

* No wasm mode (#810)

* query parameter to see a page without wasm

* pre render at same depth as render

* remove loader node rather than hide it

* Update html.go

* Update html.go

* prevent loader to show in non wasm mode

* cleanup

* load all styles before scripts

* load ga async

* remove not used css

* reduce generated html size

* reduce html size further

* reduce generated html size 3

* handler preconnect link

* src multiple call support + fix resolving

* test srcset attribute

* update deps

* fix html resolve attribute URL

* enriched http handler src

* fix preconnect default crossorigin

* update doc

* Remove pre render caching (#818)

* Remove PreRenderCache and PreRenderCacheControl

* rename and clean cache related items

* rename pre rendered item and use proxy cached items

* rename http pwaResources to cachePWAResources

* ignore empty attribute value when generating html string

* fix ignore empty attr when generating html

* revert attr filter

* preload styles

* generated html don't add resources without url

* preload right after preconnect

* add preload font support

* fix font preload type

* fix font resolver

* add font to cacheable resources

* Optimize html gen (#827)

* don't genrate html with empty id or class

* fix condition

* refactor write html attribute

* Update html_test.go

* Datset with map (#828)

* don't genrate html with empty id or class

* fix condition

* refactor write html attribute

* dataset with a map

* preload font first

* change loader display

* fix server side resource resolver

* Update page_test.go

* twitter card page support

* remove expired persisted states (#837)
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

Successfully merging this pull request may close these issues.

2 participants