falsandtru / pjax-api

The advanced PJAX superior to SPA.

Home Page:https://falsandtru.github.io/pjax-api/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to keep css throught pages?

scil opened this issue · comments

commented

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 ?

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/

commented

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.