Monday, 30 July 2018

Nifty Filtered ZFeed Tool - major rewrite planned

Since my last post, I've been testing the Nifty Filtered ZFeed tool.

What I found:

Trying to use it on  a web page on:
  • http://kdl.to: blocked by browser due to mixed http and https
  • https://niftytoolz.com blocked due to CORS (cross origin resource sharing)
  • a blog post on Blogger, a blog post on niftytoolz and on jmarshall's html testbed and all experienced one or other of the above

Just to check, I used the existing live product grid nifty tool widget as is (it uses a different feed-pull method) and it was fine on all the above.


Conclusion

Using YQL to pull a feed that uses the new Nifty Zfeed tool solves the CORS and mixed http/https problems

Other insights: Also, I need to not create an Atom feed but to duplicate the Zazzle feed XML structure. Then it will be a near pin-for-pin replacement that can be used in the existing widgets.

I think the reason why my NiftyGridZ WordPress plugin works ok is because it doesn't use YQL at all. In using the new tool I tried to do it by using NiftyGridZ method but because YQL is used deep within the new tool's belly to do the intital pulls of the zazzle feed, it didn't work, I still got the CORS problem.

Possible ways forward

  • CORS & mixed http/https issues:
    • Use YQL to pull from my new tool's feed. Rubbish idea because it would mean anyone wanting to use it would need to do the same. 
    • Rewrite the tool so it uses CURL (the same method used by NiftyGridZ)
      Yes, do this.
  • Change it from producing an ATOM feed to one identical to the one Zazzle's feed mechanism produces.
    Yes, do this.
Don't hold your breath for this to be done!