CodeIgniter Forums
CI to progressive web app - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: CI to progressive web app (/thread-70730.html)



CI to progressive web app - majortom84 - 05-21-2018

Hello All, 

Does anyone have any advice on converting to a PWA. I have tried to use this tutorial https://dev.to/pixeline/the-easy-way-to-turn-a-website-into-a-progressive-web-app-77g but had no luck with upup as with its scope it (upup.sw file) will need to be in the controller dir or near the index.php file but, I have not been able to find out how to access it from those locations.


RE: CI to progressive web app - Kennyendowed - 01-24-2019

Anybody with solution pls


RE: CI to progressive web app - Pertti - 01-25-2019

You can place these files next to your index.php file, and then they will be available from www.yourdomain.com/upup.min.js

Or, if you want to give it a specific subdirectory URL, you could create a special route that sends www.yourdomain.com/mysubfolder/upup.min.js to special controller method that loads real upup.min.js file contents and outputs it to browser as is, without adding any HTML via views.

I imagine you could also try creating real folders starting from index.php file, as typical .htaccess config for CodeIgniter only points "broken" links to index.php. I'm slightly sceptical of benefits doing it this way tho, as if you need show CI content at /subfolder1 but want to make /subfolder1/subfolder2/upup.min.js I'm 99% certain subfolder1 from .htaccess point of view is existing path, even if there are no index.html files in that folder.


RE: CI to progressive web app - Kennyendowed - 01-26-2019

(01-25-2019, 11:43 AM)Pertti Wrote: You can place these files next to your index.php file, and then they will be available from www.yourdomain.com/upup.min.js

Or, if you want to give it a specific subdirectory URL, you could create a special route that sends www.yourdomain.com/mysubfolder/upup.min.js to special controller method that loads real upup.min.js file contents and outputs it to browser as is, without adding any HTML via views.

I imagine you could also try creating real folders starting from index.php file, as typical .htaccess config for CodeIgniter only points "broken" links to index.php. I'm slightly sceptical of benefits doing it this way tho, as if you need show CI content at /subfolder1 but want to make /subfolder1/subfolder2/upup.min.js I'm 99% certain subfolder1 from .htaccess point of view is existing path, even if there are no index.html files in that folder.

Thanks for your reply but u see u said plenty tins now u lost me 
So pls provide a sample code show us how to implement  it laravel has a sample code codeigniter doesn't so pls provide one pls