falsandtru / pjax-api

The advanced PJAX superior to SPA.
https://falsandtru.github.io/pjax-api/
Apache License 2.0
318 stars 28 forks source link

how to keep css throught pages? #51

Closed scil closed 2 years ago

scil commented 2 years ago

I use same css for all pages in my site, and some css are dynamic loaded by webpack.

When I visit a map page with dynamic css, it works well for the first visit , but wrong for the second visit.

the dynamic css are not loaded again because webpack think the related modules have been loaded.

so is there any way I could keep the css not away ?

falsandtru commented 2 years ago

I'm not sure about dynamic css but it seems bad usage. You may be able to keep dynamically loaded css using the ignore option but it is unrecommended usage. All the knowledge or the diff to update the page must be contained in the fetched HTML in principle.

https://falsandtru.github.io/pjax-api/api/pjax/config/

scil commented 2 years ago

Thank you.

update: {css: false}, works for me.

And I also let web server use a lean layout to supply specialized content for pjax request, which only includes special content for special page. the part is always same across my whole website.